A dynamic adjustment training method for category information based on pest detection

By adjusting training information through image segmentation pre-training and a dynamic feedback mechanism, the problem of insufficient accuracy of the pest detection model when the data set quality is not high is solved, effective learning of difficult samples is achieved, and the model's pest detection accuracy is improved.

CN117576727BActive Publication Date: 2025-10-03GUANGDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311580829.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2025-10-03
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

Existing pest detection models are difficult to improve accuracy and application deployment when the dataset quality is not high, especially the learning of difficult samples is insufficient.

Method used

The optimal weights are obtained through image segmentation pre-training, and a dynamic feedback mechanism (DFM) is established between the insect pest retrieval library (IISL) and the loss function. The training information is dynamically adjusted during the model training process, forcing the model to focus on difficult samples. The IISL library is used to transfer category information to transform the training set.

Benefits of technology

The model's accuracy in pest detection has been improved, especially its ability to identify difficult samples, thereby enhancing the model's overall detection performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117576727B_ABST
    Figure CN117576727B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pest detection, and in particular to a method for dynamically adjusting category information based on pest detection. The method comprises pre-training a model, image segmentation, forming an insect pest search library (IISL), establishing a dynamic feedback mechanism (DFM), formal training, and analyzing training information of a single batch. The category information of the IISL is transferred to the data of the next batch, and the training information is modified in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training. The DFM feedback module is responsible for receiving and analyzing the training information, and the training information comes from the loss value output by a loss function for each category in a batch. The magnitude of the loss value can intuitively reflect the current model's learning status for each category. The above method can dynamically transfer and adjust the pest information in the training set according to the training information during training, so that the model pays more attention to the learning of difficult samples in subsequent training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pest detection, and in particular to a method for dynamically adjusting category information based on pest detection. Background Art

[0002] Agriculture is the primary prerequisite for production and development. Despite rapid advancements in agricultural science and technology, insurmountable challenges remain, the most critical of which is crop pests. To address the adverse effects of widespread pesticide use, researchers are turning to artificial intelligence (AI) technologies to address pest problems. Target detection technology is a common method for pinpointing pest identification and then capturing them.

[0003] While these new technologies have mitigated the impact of improper pesticide use, they also present new challenges. First, pest data collection is difficult and resource-intensive. This results in low-quality datasets for model training. Training models using such datasets tends to produce a high number of difficult samples, hindering both model accuracy and application deployment. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for dynamically adjusting category information based on pest detection to address the deficiencies of the existing technology.

[0005] To achieve the above object, the technical solution of the present invention is as follows:

[0006] A method for dynamically adjusting category information based on pest detection includes the following steps:

[0007] Step 1: Pre-train the model for image segmentation to obtain the optimal weights for image segmentation in the dataset;

[0008] Step 2: Segment the images in the dataset according to the optimal weights in pre-training and obtain the category information of the images;

[0009] Step 3: The segmented image information is combined into a one-to-many insect pest retrieval library (IISL) that maps categories and image information.

[0010] Step 4: Establish a dynamic feedback mechanism (DFM) between the insect pest retrieval library (IISL) and the model's loss function to analyze and correct the model's training;

[0011] Step 5: Formal training of the model for target detection;

[0012] Step 6: The information output by the loss function is passed to the DFM feedback module, which analyzes the training information of a single batch;

[0013] Step 7: Based on the output of the DFM feedback module, the IISL category information is transferred to the next batch of data, and the training information is modified in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training.

[0014] Furthermore, the pre-training in step 1 is optimized based on the pest detection model training. The model will first perform image segmentation pre-training to learn the segmentation information of the images in the dataset. At the same time, the model needs to be fully trained to more accurately segment the category information in the data.

[0015] Furthermore, the image segmentation in step 2 is to use the optimal weights of the model in pre-training for image segmentation, that is, to separate the category information and background information in the data set, and to count the quantity and type of the above information.

[0016] Furthermore, the establishment of the IISL library in step 3 is based on the segmented image data. A one-to-many mapping relationship is established between these image information and categories. This mapping relationship is more conducive to the DFM feedback module to achieve the transfer of category information during model training. The mapping relationship is shown in the following formula:

[0017]

[0018] Among them, C i is the i-th category in the data set, x represents the category information, (x1, x2, x3, ..., x m ) indicates that this information belongs to category C i , m means that the category contains m pieces of information. Each category of information will be classified according to the function f(). The essence of f() is a filter, and the expression is as follows:

[0019]

[0020] Among them, n represents the number of categories. If the current information x belongs to category C i , then x is of category C i Establish a mapping relationship.

[0021] Furthermore, the DFM feedback module in step 4 is responsible for receiving and analyzing training information. This training information comes from the loss value output by the loss function for each category in a batch. The size of this loss value can intuitively reflect the current model's learning status for each category. The DFM feedback module will analyze the current training status of the model based on this training information. Its expression is as follows:

[0022]

[0023] Among them, Loss is the total loss in a batch, loss j is the jth sample in the batch, and the category that is not in this batch, loss j The corresponding category loss will be 0, which makes N′ i The result is also 0, and the information of this category will not be adjusted. 总 is the total number of samples in the entire data set, N i is the number of samples of category i in the dataset.

[0024] Furthermore: The target detection training in step 5 is different from the segmentation training in the previous pre-training. The target detection training is the formal training of the model. The entire training process of the model includes the segmentation training in pre-training and the target detection training in the formal training.

[0025] Furthermore, in step 6, information analysis is performed. For each batch of training data, the model outputs the training status of each category, i.e., the loss value. The DFM feedback module samples these loss values ​​and analyzes the current training status of each category. Then, based on the training information of the batch, it uses Equation (3) to form the information adjustment weights for each category.

[0026] Furthermore, in step seven, information migration and information transformation, the IISL library determines whether the current training requires transformation of the training set based on the category weights output by the DFM feedback module. If necessary, the IISL library migrates data for key categories based on the size of the weights, forcing the model to pay more attention to the difficult-to-learn categories in the next batch training.

[0027] The beneficial effects of the present invention are as follows: the present invention transforms the training information through multiple steps, and according to the output results of the DFM feedback module, the category information of the IISL is migrated to the data of the next batch, and the training information is transformed in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training. This method can dynamically migrate and adjust the pest information in the training set according to the training information during training, so that the model pays more attention to the learning of difficult samples in subsequent training. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a step diagram of the training method of the present invention.

[0029] Figure 2 This is a detailed step diagram of the training method of the present invention.

[0030] Figure 3 Schematic diagram of the data before training method optimization.

[0031] Figure 4 Schematic diagram of the data after the training method is optimized. DETAILED DESCRIPTION

[0032] The present invention is described in detail below with reference to the accompanying drawings.

[0033] like Figure 1-4 As shown, a method for dynamically adjusting category information based on pest detection includes the following steps:

[0034] Step 1: Pre-train the model for image segmentation to obtain the optimal weights for image segmentation in the dataset;

[0035] Step 2: Segment the images in the dataset according to the optimal weights in pre-training and obtain the category information of the images;

[0036] Step 3: The segmented image information is combined into a one-to-many insect pest retrieval library (IISL) that maps categories and image information.

[0037] Step 4: Establish a dynamic feedback mechanism (DFM) between the insect pest retrieval library (IISL) and the model's loss function to analyze and correct the model's training;

[0038] Step 5: Formal training of the model for target detection;

[0039] Step 6: The information output by the loss function is passed to the DFM feedback module, which analyzes the training information of a single batch;

[0040] Step 7: Based on the output of the DFM feedback module, the IISL category information is transferred to the next batch of data, and the training information is modified in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training.

[0041] The present invention transforms training information through multiple steps. Based on the output results of the DFM feedback module, the category information of the IISL is migrated to the next batch of data. The training information is modified in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training. This method can dynamically migrate and adjust the pest information in the training set based on the training information during training, so that the model pays more attention to the learning of difficult samples in subsequent training.

[0042] Furthermore, the pre-training in step 1 is optimized based on the pest detection model training. The model will first perform image segmentation pre-training to learn the segmentation information of the images in the dataset. At the same time, the model needs to be fully trained to more accurately segment the category information in the data.

[0043] Furthermore, the image segmentation in step 2 is to use the optimal weights of the model in pre-training for image segmentation, that is, to separate the category information and background information in the data set, and to count the quantity and type of the above information.

[0044] Furthermore, the establishment of the IISL library in step 3 is based on the segmented image data. A one-to-many mapping relationship is established between these image information and categories. This mapping relationship is more conducive to the DFM feedback module to achieve the transfer of category information during model training. The mapping relationship is shown in the following formula:

[0045]

[0046] Among them, C i is the i-th category in the data set, x represents the category information, (x1, x2, x3, ..., x m ) indicates that this information belongs to category C i , m means that the category contains m pieces of information. Each category of information will be classified according to the function f(). The essence of f() is a filter, and the expression is as follows:

[0047]

[0048] Among them, n represents the number of categories. If the current information x belongs to category C i , then x is of category C i Establish a mapping relationship.

[0049] Furthermore, the DFM feedback module in step 4 is responsible for receiving and analyzing training information. This training information comes from the loss value output by the loss function for each category in a batch. The size of this loss value can intuitively reflect the current model's learning status for each category. The DFM feedback module will analyze the current training status of the model based on this training information. Its expression is as follows:

[0050]

[0051] Among them, Loss is the total loss in a batch, loss j is the jth sample in the batch, and the category that is not in this batch, loss j The corresponding category loss will be 0, which makes N′ i The result is also 0, and the information of this category will not be adjusted. 总 is the total number of samples in the entire data set, N i is the number of samples of category i in the dataset.

[0052] Furthermore: The target detection training in step 5 is different from the segmentation training in the previous pre-training. The target detection training is the formal training of the model. The entire training process of the model includes the segmentation training in pre-training and the target detection training in the formal training.

[0053] Furthermore, in step 6, information analysis is performed. For each batch of training data, the model outputs the training status of each category, i.e., the loss value. The DFM feedback module samples these loss values ​​and analyzes the current training status of each category. Then, based on the training information of the batch, it uses Equation (3) to form the information adjustment weights for each category.

[0054] Furthermore, in step seven, information migration and information transformation, the IISL library determines whether the current training requires transformation of the training set based on the category weights output by the DFM feedback module. If necessary, the IISL library migrates data for key categories based on the size of the weights, forcing the model to pay more attention to the difficult-to-learn categories in the next batch training.

[0055] Figure 3 This is the data before optimization. Figure 4 is the optimized data. Figure 3 and Figure 4 As can be seen, the above comparative experiments were conducted on the pest dataset IP102, using the SSD300 model. The AP50 metric used in these comparative experiments is shown in both data sets. The AP50 score for most categories has been improved, meaning the model's pest detection accuracy has been improved without increasing inference time. The SSD300 model used in these experiments has been widely used in practical applications related to object detection. These comparative experimental results not only validate the effectiveness of this training method but also provide strong support for its deployment in pest detection applications.

[0056] In summary, it can be seen that the present invention has the above-mentioned excellent characteristics, which can enhance its performance unprecedented in the past and become a product with great practical value.

[0057] The above contents are only preferred embodiments of the present invention. For ordinary technicians in this field, according to the concept of the present invention, there may be changes in the specific implementation methods and application scopes. The contents of this specification should not be understood as limiting the present invention.

Claims

1. A method for dynamically adjusting category information based on pest detection, characterized by: The following steps are involved: Step 1: Pre-train the model for image segmentation to obtain the optimal weights for image segmentation in the dataset; Step 2: Segment the images in the dataset according to the optimal weights in pre-training and obtain the category information of the images; Step 3: The segmented image information is combined into a one-to-many insect pest retrieval library (IISL) that maps categories and image information. Step 4: Establish a dynamic feedback mechanism (DFM) between the insect pest retrieval library (IISL) and the model's loss function to analyze and correct the model's training; Step 5: Formal training of the model for target detection; Step 6: The information output by the loss function is passed to the DFM feedback module, which analyzes the training information of a single batch; Step 7: Based on the output of the DFM feedback module, the IISL category information is transferred to the next batch of data, and the training information is modified in a targeted manner, forcing the model to pay more attention to the learning of difficult samples in the next batch training; The DFM feedback module in step 4 is responsible for receiving and analyzing training information. The training information comes from the loss value output by the loss function for each category in a batch. The size of the loss value can intuitively reflect the current model's learning status for each category. The DFM feedback module will analyze the current training status of the model based on the training information. Its expression is as follows: Among them, Loss is the total loss in a batch, loss j is the jth sample in the batch, and the category that is not in this batch, loss j The corresponding category loss will be 0, which makes N′ i The result is also 0, and the information of this category will not be adjusted; N 总 is the total number of samples in the entire data set, N i is the number of samples of category i in the dataset.

2. The method for dynamic adjustment of category information based on pest detection according to claim 1, characterized in that: The pre-training in step 1 is optimized based on the model training of pest detection. The model will first perform pre-training on image segmentation, and learn the segmentation information of the images in the dataset through pre-training. At the same time, the model needs to be fully trained to more accurately segment the category information in the data.

3. The method for dynamic adjustment of category information based on pest detection according to claim 1, characterized in that: The image segmentation in step 2 is to use the optimal weight of the model in pre-training for image segmentation, that is, to separate the category information and background information in the data set, and to perform statistics on the quantity and type of the above information.

4. The method for dynamic adjustment of category information based on pest detection according to claim 1, characterized in that: The establishment of the IISL library in step 3 is based on the segmented image data. A one-to-many mapping relationship is established between these image information and categories. The establishment of this mapping relationship is more conducive to the DFM feedback module to achieve the migration of category information during model training. The mapping relationship is shown in the following formula: Among them, C i is the i-th category in the data set, x represents the category information, (x1, x2, x3, ..., x m ) indicates that this information belongs to category C i , m means that the category contains m pieces of information. Each category of information will be classified according to the function f(). The essence of f() is a filter. The expression is as follows: Among them, n represents the number of categories. If the current information x belongs to category C i , then x is of category C i Establish a mapping relationship.

5. The method for dynamic adjustment of category information based on pest detection according to claim 1, characterized in that: The target detection training in step five is different from the segmentation training in the previous pre-training. The target detection training is the formal training of the model. The entire training process of the model includes the segmentation training in the pre-training and the target detection training in the formal training.

6. The method for dynamic adjustment of category information based on pest detection according to claim 5, characterized in that: In the information analysis of step 6, the model outputs the training status of each category, i.e., the loss value, for each batch of data it trains. The DFM feedback module samples the loss values ​​of these categories and analyzes the current training status of each category. Then, based on the training information of the batch, the information adjustment weight of each category is formed using formula (3).

7. The method for dynamic adjustment of category information based on pest detection according to claim 6, characterized in that: In the information migration and information transformation of step seven, the IISL library determines whether the current training needs to transform the training set based on the category weights output by the DFM feedback module. If necessary, the IISL library migrates data for key categories based on the size of the weights, forcing the model to pay more attention to the categories that are difficult to learn in the next batch training.

Citation Information

Patent Citations

  • Pest image classification method based on fine-grained classification technology

    CN113239947A

  • Garden engineering small target pest detection method based on super-resolution reconstruction and data enhancement

    CN115147646A