Insect budgeting method and system based on machine vision

By using a machine vision-based insect infestation estimation method, visual acquisition devices and convolutional neural network algorithms are employed to identify and predict the number of tobacco beetle trap images, solving the problem of inaccurate manual identification in tobacco factories and improving the accuracy and convenience of tobacco beetle identification.

CN120976504APending Publication Date: 2025-11-18CHONGQING CHINA TOBACCO IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511147360.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Currently, tobacco factories rely on manual visual identification and counting when using tobacco beetle traps for pest monitoring, which leads to inaccurate identification and prediction calculations, affecting the accuracy and convenience of pest monitoring.

Method used

A machine vision-based insect infestation estimation method is adopted. Images of tobacco beetle traps are acquired by setting up a visual acquisition device, a tobacco beetle detection and recognition model is constructed and trained, and a convolutional neural network algorithm is used for tobacco beetle identification and population prediction. Combined with Faster R-CNN loss function and data augmentation technology, the accuracy and efficiency of the recognition model are improved.

Benefits of technology

This improved the accuracy and convenience of tobacco insect identification, solved the problem of inaccurate manual identification and counting, and enhanced the accuracy and efficiency of insect monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976504A_ABST
    Figure CN120976504A_ABST
Patent Text Reader

Abstract

The invention discloses an insect budgeting method and system based on machine vision, and the method comprises the steps: setting a visual collection device to carry out the image collection of a cigarette beetle trap at each monitoring point, so as to obtain the image of the cigarette beetle trap; a tobacco insect detection and identification model is constructed, and tobacco insect identification training is carried out; inputting the tobacco beetle trap image into the trained tobacco beetle detection and recognition model, and performing tobacco beetle recognition; and setting a prediction algorithm, and performing tobacco insect number prediction calculation on the tobacco insect image identified by the tobacco insect detection and identification model. According to the method, the problem that the identification and prediction calculation are inaccurate due to the fact that tobacco insects are identified and counted manually and visually in an existing tobacco factory can be solved, and the accuracy and convenience of tobacco insect identification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of tobacco moth monitoring, and more particularly to a moth situation budgeting method and system based on machine vision. BACKGROUND

[0002] Existing tobacco factories use tobacco beetle traps as the main tool for moth situation monitoring, and the number of moths on the trap is identified and counted by manual visual inspection after on-site inspection. When the number of moths on the trap is large, the counting is prone to error, which cannot provide correct data analysis for moth situation monitoring, and thus leads to poor moth situation monitoring effect. Therefore, how to accurately identify and predict the number of moths and improve the accuracy and convenience of moth monitoring is of great significance. SUMMARY

[0003] The present application provides a moth situation budgeting method and system based on machine vision, which solves the problem of inaccurate identification and prediction calculation of moths by manual visual inspection in existing tobacco factories, and improves the accuracy and convenience of moth identification.

[0004] To achieve the above object, the present application provides the following technical scheme:

[0005] A moth situation budgeting method based on machine vision, comprising:

[0006] Setting a visual acquisition device to acquire images of tobacco beetle traps at each monitoring point to obtain tobacco beetle trap images;

[0007] Constructing a moth detection and identification model and performing moth identification training;

[0008] Inputting the tobacco beetle trap images into the trained moth detection and identification model to identify moths;

[0009] Setting a prediction algorithm to predict and calculate the number of moths in the moth images identified by the moth detection and identification model.

[0010] Preferably, the setting of the prediction algorithm comprises:

[0011] Building a convolutional neural network algorithm model, wherein the convolutional neural network algorithm model is provided with an input layer, a convolutional layer, a pooling layer and a full connection layer.

[0012] Preferably, the setting of the prediction algorithm further comprises:

[0013] Establishing a loss function of Faster R-CNN and inputting it into the convolutional neural network algorithm model to perform parameter optimization, so as to improve the execution efficiency of the convolutional neural network algorithm model.

[0014] Preferably, the number of cigarette beetles is predicted and calculated based on the cigarette beetle image identified by the cigarette beetle detection and identification model, comprising:

[0015] The cigarette beetle image is subjected to data enhancement by increasing image rotation, scaling and clipping, color jittering and random noise addition, so as to diversify the extracted cigarette beetle features in the input layer.

[0016] Preferably, the number of cigarette beetles is predicted and calculated based on the cigarette beetle image identified by the cigarette beetle detection and identification model, further comprising:

[0017] The performance of the feature map extracted by the convolution layer is improved by setting parameters such as sliding window step size, convolution kernel size, edge padding and number of convolution kernels.

[0018] Preferably, the number of cigarette beetles is predicted and calculated based on the cigarette beetle image identified by the cigarette beetle detection and identification model, further comprising:

[0019] The probability of each candidate region belonging to the cigarette beetle is calculated by the full connection layer and the softmax classifier, and then the number of cigarette beetles is predicted.

[0020] Preferably, the cigarette beetle detection and identification model is constructed and trained for cigarette beetle identification, comprising:

[0021] The training of the cigarette beetle detection and identification model is constructed based on PaddlePaddle as a deep learning framework and a deep learning platform.

[0022] Preferably, the cigarette beetle detection and identification model is constructed and trained for cigarette beetle identification, further comprising:

[0023] The cigarette beetle pictures are collected, and the cigarette beetle pictures are input as training samples into the cigarette beetle detection and identification model for model training;

[0024] The cigarette beetle images are labeled and preprocessed, and then input into the cigarette beetle detection and identification model for cigarette beetle identification training.

[0025] The present application also provides a pest situation prediction system based on machine vision, which uses the above prediction method, comprising: a camera, an image acquisition terminal and a server;

[0026] A plurality of cameras are arranged in front of the cigarette beetle traps of each monitoring point to take pictures of the cigarette beetle traps.

[0027] The image acquisition terminal is signal connected with the camera to obtain the cigarette beetle trap images of each monitoring point, and the cigarette beetle trap images are uploaded to the server.

[0028] The server is provided with a cigarette beetle detection and identification model and a prediction algorithm.

[0029] The server is provided with a man-machine operation interface, and performs moth identification and moth quantity prediction calculation according to the moth detection and identification model and the prediction algorithm.

[0030] Preferably, the image acquisition terminal is an image processing controller.

[0031] The present application provides a kind of based on machine vision's insect situation budget method and system, by setting moth detection and identification model and prediction algorithm, the moth identification and quantity prediction calculation of the moth trap image of each monitoring point are carried out.Solve the existing tobacco factory adopts manual visual identification and counting of moth, there is the problem of inaccurate identification and prediction calculation, can improve the accuracy and convenience of moth identification. BRIEF DESCRIPTION OF DRAWINGS

[0032] In order to more clearly illustrate the specific embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows.

[0033] Figure 1 It is a kind of based on machine vision's insect situation budget method and system provided by the present application.

[0034] Figure 2 It is a kind of based on machine vision's insect situation budget system provided by the present application. DETAILED DESCRIPTION

[0035] In order to make the personnel in the technical field better understand the scheme of the embodiments of the present application, the embodiments of the present application will be further described in detail in combination with the drawings and embodiments.

[0036] For the current identification and counting of moth, there is the problem of inaccurate identification and prediction calculation, the present application provides a kind of based on machine vision's insect situation budget method and system, solves the existing tobacco factory adopts manual visual identification and counting of moth, there is the problem of inaccurate identification and prediction calculation, can improve the accuracy and convenience of moth identification.

[0037] As Figure 1 Based on machine vision's insect situation budget method, comprising:

[0038] S1: setting vision acquisition device to the moth trap of each monitoring point is carried out image acquisition, to obtain moth trap image.

[0039] S2: construct moth detection and identification model, and carry out moth identification training.

[0040] S3: the moth trap image is input into the moth detection and identification model trained, and carries out moth identification.

[0041] S4: Set a prediction algorithm to predict the number of tobacco insects in the tobacco insect images identified by the tobacco insect detection and recognition model.

[0042] Specifically, by taking daily photos of tobacco beetle traps, a tobacco beetle detection and recognition model is set up to identify and predict tobacco beetles in the images of the traps at each monitoring point. The tobacco beetle traps can be paper-based adhesive boards containing tobacco beetle pheromones. Images of the traps are acquired using a visual acquisition device, and the tobacco beetle detection and recognition module automatically identifies tobacco beetles and predicts their numbers. The tobacco beetle detection and recognition model can employ a neural network model, using a Faster R-CNN network: the backbone network uses a ResNet convolutional residual network. The ResNet residual network model can filter out unqualified convolutional layer weight parameters during training through its residual block structure, ensuring that even increasing the number of layers will not cause model convergence failure. The neck network uses an FPN feature pyramid network, utilizing the inherent feature pyramid characteristics of CNN networks to simulate the function of an image pyramid. This allows RPN and Fast R-CNN to predict objects of different sizes on feature maps at multiple scales, significantly improving the detection capability of Faster R-CNN. The head network employs a candidate region network (RPN), primarily used to generate candidate regions. First, a set of anchor boxes is generated, cropped and filtered, and then a softmax classifier determines whether the anchors belong to the foreground or background (i.e., whether they are objects or not), thus constituting a binary classification. Simultaneously, another branch, bounding box regression, refines the anchor boxes, forming more precise regions. The detection result is obtained through bounding boxes. This method improves the accuracy and convenience of tobacco insect identification.

[0043] Furthermore, the setting of the prediction algorithm includes: building a convolutional neural network algorithm model, wherein the convolutional neural network algorithm model has an input layer, a convolutional layer, a pooling layer and a fully connected layer.

[0044] Furthermore, the setting of the prediction algorithm also includes: establishing a loss function for Faster R-CNN and integrating it into the convolutional neural network algorithm model to optimize parameters and improve the execution efficiency of the convolutional neural network algorithm model.

[0045] Furthermore, the step of predicting the number of tobacco beetles in the tobacco beetle images identified by the tobacco beetle detection and recognition model includes:

[0046] Data augmentation of the tobacco worm images is performed by adding image rotation, scaling and cropping, color jitter, and random noise to diversify the extracted tobacco worm features at the input layer.

[0047] The performance of convolutional layers in extracting feature maps can be improved by setting parameters such as the sliding window stride, kernel size, edge padding, and number of kernels.

[0048] The probability of each candidate region belonging to the tobacco beetle is calculated by using a fully connected layer and a softmax classifier, thereby obtaining a prediction of the number of tobacco beetles.

[0049] In practical applications, the prediction algorithm builds the convolutional neural network algorithm model layer by layer in the order of input layer, convolutional layer, pooling layer, and fully connected layer.

[0050] Input Layer: Examination of the labeled images in the training set revealed insufficient diversity in terms of interference factors such as lighting conditions, the number and posture of beetles, and debris contamination. This resulted in limited features available for model extraction, hindering effective training to handle randomly changing shooting scenarios. Improvements can be made by adding data augmentation features such as image rotation, scaling and cropping, color jittering, and random noise addition to enhance the model's generalization ability.

[0051] Convolutional Layers: The main function of convolutional layers is to extract features from targets. Improving convolutional layers significantly enhances recognition accuracy. A convolutional layer consists of an input image, a convolutional kernel, and an output feature map. From a theoretical perspective, the size of the output feature map determines the feature resolution, which in turn is determined by the size of the convolutional kernel. Hyperparameters such as the sliding window stride, kernel size, edge padding, and the number of kernels determine the performance of the convolutional layer in extracting feature maps. A shorter stride generally results in a higher resolution output feature map. Due to the limited detail in the body of the tobacco beetle, a stride of 1 is more suitable. The size of the convolutional kernel affects the scale of features it can capture. Smaller kernels can capture more detailed features, while larger kernels can capture a wider range of features. Testing showed that the pixel size of the tobacco beetle in images is generally around 32*32 pixels. Based on this, the convolutional kernel was set to 3*3, with edge padding of 1, to ensure the feature map meets the resolution requirements. Each convolutional kernel identifies one image feature. Using small convolutional kernels with a large number of kernels can improve the network's resolution. There is no specific formula for how many convolutional kernels to use; it is generally determined based on experience and experimentation. Industry experience suggests that the number should be a multiple of 2. Therefore, we prepared combinations of 8, 16, and 32 convolutional kernels. After testing, 8 convolutional kernels resulted in the fastest training speed but insufficient feature accuracy. 16 convolutional kernels were slightly slower, but the feature accuracy met the requirements. 32 convolutional kernels were the slowest, but the improvement in feature accuracy was not significant. Therefore, 16 convolutional kernels were chosen for the network design.

[0052] Pooling layers play a crucial role in convolutional neural networks, typically used to reduce the dimensionality of feature maps, thereby reducing computational requirements and increasing the receptive field of the feature detector. Max pooling's main advantage is that it preserves the most salient features within the window. However, it loses some detailed information. Average pooling mitigates the problem of max pooling potentially overemphasizing certain features, but may dilute some important features. The smoke beetle is small, has a single color, and lacks sufficient features. To better highlight feature representation, sacrificing some texture features while retaining more edge features, the max pooling algorithm was chosen to design the pooling layers.

[0053] Fully connected layer: The fully connected layer and the softmax classifier calculate the specific category (smoker beetle, fly, moth, etc.) to which each candidate region proposal belongs, and output the cls_prob probability vector; at the same time, bounding-box regression is used again to obtain the position offset bbox_pred of each candidate region proposal, which is used to obtain a more accurate target detection box.

[0054] Furthermore, the construction of the tobacco insect detection and recognition model and the training of tobacco insect recognition include: using PaddlePaddle as a deep learning framework to build a training and deep learning platform for the tobacco insect detection and recognition model.

[0055] Furthermore, the construction of the tobacco beetle detection and recognition model, and the training for tobacco beetle recognition, also includes:

[0056] Collect images of tobacco insects and use these images as training samples to train the tobacco insect detection and recognition model.

[0057] The images of the tobacco beetle traps are labeled with tobacco beetle tags, and after image preprocessing, they are input into the tobacco beetle detection and recognition model for tobacco beetle recognition training.

[0058] In practical applications, Labelimg's graphic image annotation tool is used to label tobacco beetles. The coordinate information of the tobacco beetles can be manually labeled and saved in XML format. The XML file contains information such as the location coordinates of the tobacco beetles in the image, their species, and the image path.

[0059] Therefore, this invention provides a machine vision-based insect infestation estimation method and system. By setting up a tobacco beetle detection and identification model and prediction algorithm, it identifies and predicts the number of tobacco beetles in images from tobacco beetle traps at various monitoring points. This solves the problem of inaccurate identification and prediction calculations in existing tobacco factories that rely on manual visual identification and counting of tobacco beetles, and improves the accuracy and convenience of tobacco beetle identification.

[0060] Accordingly, such as Figure 2 As shown, the present invention also provides a machine vision-based insect infestation budgeting system, using the above-mentioned budgeting method, comprising: a camera, an image acquisition terminal, and a server; multiple cameras are positioned in front of the tobacco beetle traps at each monitoring point to photograph the tobacco beetle traps; the image acquisition terminal is signal-connected to the cameras to acquire images of the tobacco beetle traps at each monitoring point and transmits the tobacco beetle trap images to the server; the server is equipped with a tobacco beetle detection and recognition model and a prediction algorithm; the server is equipped with a human-machine interface and performs tobacco beetle identification and tobacco beetle quantity prediction calculation based on the tobacco beetle detection and recognition model and the prediction algorithm.

[0061] Furthermore, the image acquisition terminal is an image processing controller.

[0062] Therefore, this invention provides a machine vision-based insect infestation estimation system. By setting up a tobacco beetle detection and recognition model and prediction algorithm, it identifies and predicts the number of tobacco beetles in images from tobacco beetle traps at various monitoring points. This solves the problem of inaccurate identification and prediction calculations in existing tobacco factories that rely on manual visual identification and counting of tobacco beetles, thus improving the accuracy and convenience of tobacco beetle identification.

[0063] The structure, features, and effects of the present invention have been described in detail above with reference to the embodiments shown in the figures. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, shall be within the protection scope of the present invention as long as they do not exceed the spirit covered by the specification and figures.

Claims

1. A method for insect infestation estimation based on machine vision, characterized in that, include: A visual acquisition device was set up to acquire images of the beetle traps at each monitoring point in order to obtain images of the beetle traps. Construct a tobacco beetle detection and identification model, and train it for tobacco beetle identification; The image of the tobacco beetle trap is input into the trained tobacco beetle detection and recognition model to identify the tobacco beetle; A prediction algorithm is set up to predict the number of tobacco insects in the tobacco insect images identified by the tobacco insect detection and recognition model.

2. The insect infestation estimation method based on machine vision according to claim 1, characterized in that, The setting of the prediction algorithm includes: A convolutional neural network algorithm model is constructed, which includes an input layer, a convolutional layer, a pooling layer, and a fully connected layer.

3. The insect infestation estimation method based on machine vision according to claim 2, characterized in that, The setting of the prediction algorithm also includes: A loss function for Faster R-CNN is established and integrated into the convolutional neural network algorithm model to optimize parameters and improve the execution efficiency of the convolutional neural network algorithm model.

4. The insect infestation estimation method based on machine vision according to claim 3, characterized in that, The step of predicting the number of tobacco beetles in the tobacco beetle images identified by the tobacco beetle detection and recognition model includes: Data augmentation of the tobacco worm images is performed by adding image rotation, scaling and cropping, color jitter, and random noise to diversify the extracted tobacco worm features at the input layer.

5. The insect infestation estimation method based on machine vision according to claim 4, characterized in that, The step of predicting the number of tobacco beetles in the tobacco beetle images obtained by the tobacco beetle detection and recognition model further includes: The performance of convolutional layers in extracting feature maps can be improved by setting parameters such as the sliding window stride, kernel size, edge padding, and number of kernels.

6. The insect infestation estimation method based on machine vision according to claim 5, characterized in that, The step of predicting the number of tobacco beetles in the tobacco beetle images obtained by the tobacco beetle detection and recognition model further includes: The probability of each candidate region belonging to the tobacco beetle is calculated by using a fully connected layer and a softmax classifier, thereby obtaining a prediction of the number of tobacco beetles.

7. The insect infestation estimation method based on machine vision according to claim 6, characterized in that, The construction of the tobacco beetle detection and recognition model, and the training for tobacco beetle recognition, includes: The training and deep learning platform for the tobacco insect detection and recognition model is constructed using PaddlePaddle as a deep learning framework.

8. The insect infestation estimation method based on machine vision according to claim 7, characterized in that, The construction of the tobacco beetle detection and recognition model, and the training for tobacco beetle recognition, also includes: Collect images of tobacco insects and use these images as training samples to train the tobacco insect detection and recognition model. The images of the tobacco beetle traps are labeled with tobacco beetle tags, and after image preprocessing, they are input into the tobacco beetle detection and recognition model for tobacco beetle recognition training.

9. A machine vision-based insect infestation budgeting system, using the budgeting method described in any one of claims 1 to 8, characterized in that, include: Cameras, image acquisition terminals, and servers; Multiple cameras are positioned in front of the beetle traps at each monitoring point to take pictures of the beetle traps; The image acquisition terminal is connected to the camera signal to acquire images of the beetle traps at each monitoring point and transmits the beetle trap images to the server. The server is equipped with a tobacco beetle detection and identification model and a prediction algorithm; The server is equipped with a human-machine interface and performs tobacco insect identification and tobacco insect quantity prediction calculation based on the tobacco insect detection and identification model and the prediction algorithm.

10. The insect infestation estimation system based on machine vision according to claim 9, characterized in that, The image acquisition terminal is an image processing controller.