Automatic insect pest classification and identification method and system based on laser enhancement

Through laser enhancement technology and deep learning model, the problems of small lesions and unstable image quality in automatic identification and classification of rice pests are solved, and precise pest detection in complex backgrounds is achieved, which improves the accuracy and efficiency of identification and classification. .

CN119206782APending Publication Date: 2024-12-27HANGZHOU UNIV OF ELECTRONIC SCI & TECH PINGHU DIGITAL TECH INNOVATION RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411257016.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Automatic identification and classification of rice pests face challenges, including small differences in lesions caused by different pests, difficulty in accurately distinguishing the degree of leaf disease in traditional image processing technologies, and unstable image quality under traditional lighting conditions, affecting the accuracy of identification and classification.

Method used

Using laser-enhanced automatic classification and identification method, we can determine the specific wavelengths of different pests by searching literature, use laser irradiation to enhance the comparison between pests and healthy leaves, and design a laser-enhanced automatic classification and identification camera system for pests, combined with deep learning models, select Suitable laser wavelengths and data sets are constructed to optimize the model to improve identification accuracy.

Benefits of technology

It improves the accuracy and reliability of pest identification and classification, and can realize accurate detection of field pests in complex contexts, enhance differences between different insect bodies, improve identification efficiency, and is suitable for actual agricultural production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206782A_ABST
    Figure CN119206782A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic insect pest classification and identification method and system based on laser enhancement. Firstly, proper classification wavelengths are selected according to reflection wavebands of different insect pests; acquiring insect pest images by using an automatic insect pest classification and recognition camera system, constructing insect pest data sets under different laser wavelengths, performing classification testing on insect pests by using an automatic insect pest classification and recognition model, continuously adjusting and optimizing the model, and determining an optimal laser wavelength; and finally, using a camera system to shoot a to-be-detected insect pest image after optimal laser wavelength enhancement, and inputting the to-be-detected insect pest image into the trained model to realize automatic classification and identification of insect pests. According to the method, the spectrum technology and the deep learning image recognition technology are combined and applied to pest recognition and classification tasks, and the technical problems that pest appearance differences are small, features are not obvious, and distinguishing is difficult are innovatively solved. The method can help a user to more efficiently count the number of different red seas, draw an insect condition curve, grasp the development trend of the number of insect pests in real time, and provide data support for formulating an accurate prevention and control strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of insect pest image recognition, and more specifically, relates to an insect pest automatic classification and recognition method and system based on laser enhancement. Background Art

[0002] In recent years, crop diseases and pests have had a serious impact on agricultural production, among which rice pests are a major challenge faced in the rice planting process. The accuracy and timeliness of pest identification and classification are crucial to effectively prevent and control pests and ensure the healthy growth of crops. Traditional pest identification and classification methods usually rely on manual observation and empirical judgment, which has problems of subjectivity and inaccuracy, and it becomes very difficult to process large-scale data. Therefore, the development of an automated, efficient and accurate pest classification and identification system is of great significance to improving rice production efficiency and reducing losses.

[0003] Initial pest identification and classification mainly relied on the experience of agricultural experts and farmers, who used the naked eye to observe plant lesions to determine the type and severity of pests. This method is time-consuming and laborious, and is limited by personal experience, so accuracy is difficult to guarantee. With the development of science and technology, image processing technology has gradually been introduced into agricultural pest identification, and preliminary identification of pests and diseases is achieved by analyzing the color, shape, and texture of crop leaves. In the late 20th and early 21st centuries, advances in computer vision technology made image-based automatic recognition systems possible. Algorithms such as edge detection, color analysis, and morphological processing are used to extract feature information from images for pest and disease identification and classification. Although these systems have reduced the burden of manual observation to a certain extent, due to algorithmic limitations, it is difficult to handle complex backgrounds and variable pest characteristics, and recognition accuracy and robustness are still low.

[0004] In the 21st century, artificial intelligence and machine learning technologies have developed rapidly, especially the rise of deep learning technology, which has brought about changes in the field of pest identification. Deep learning models, especially convolutional neural networks (CNNs), can automatically learn discriminative features from a large amount of image data in image recognition and classification tasks, and achieve high-precision recognition and classification. Pest identification models based on deep learning have been integrated into practical application systems, such as smart insect lamps, VR glasses, and smart sex attractant sticky boards. These systems have developed user-friendly interfaces and efficient back-end systems, which can be deployed on the cloud or local servers to achieve real-time pest identification and classification. This intelligent and automated pest identification system not only improves the accuracy and efficiency of identification, but can also be widely used in actual agricultural production to effectively prevent and control pests and ensure the healthy growth of crops.

[0005] However, the automatic identification and classification of rice pests still faces some technical challenges. First, due to the small differences in the lesions caused by different pests, traditional image processing technology often has difficulty in accurately distinguishing the degree of disease on the leaves. Second, the characteristics of rice pests are diverse and complex, including multi-dimensional information such as leaf color, shape, and texture, which increases the difficulty of classification and identification. In addition, images collected under traditional lighting conditions are easily affected by light and angle, resulting in unstable image quality, which further affects the recognition and classification performance of pests. Summary of the invention

[0006] The lesions caused by different insect pests are relatively small and contain multi-dimensional information such as leaf color, shape and texture. Images collected under traditional lighting conditions are easily affected by light and angle, resulting in unstable image quality. These characteristics seriously increase the difficulty of classification. To address these difficulties, the present invention proposes an automatic classification and identification method and system for insect pests based on laser enhancement to achieve accurate detection of insect pests in complex backgrounds in the field.

[0007] In order to solve the above problems, the method and system of the present invention determine the specific wavelength of each pest (such as rice planthopper, striped stem borer, rice leaf roller) by searching literature reviews or professional consultation, and use laser irradiation to enhance the differences between different insects to improve the accuracy and reliability of pest identification and classification. By selecting appropriate laser wavelengths for different pests, the contrast between pests and healthy leaves can be enhanced, thereby improving the identification and classification of pests.

[0008] On the one hand, a method for automatic classification and identification of insect pests based on laser enhanced images comprises the following steps:

[0009] S1. According to the reflection bands of different pests, use the characteristic band extraction algorithm to select the appropriate classification wavelength;

[0010] S2. Design a laser-enhanced camera system for automatic classification and identification of insect pests;

[0011] S3. Based on the characteristic bands selected in S1, use a camera to collect images of normal and pest-infested leaves under laser irradiation of different wavelengths, and construct pest datasets under different laser wavelengths to ensure that the datasets cover various angles, lighting conditions, and pest levels to increase the robustness of the model.

[0012] S4, using the pest data set established in S3, using the pest automatic classification and recognition model to perform pest classification tests, continuously adjusting and optimizing the model, and determining the optimal laser wavelength;

[0013] S5, using the pest automatic classification and identification camera system to take images of pests to be detected after enhancement with the optimal laser wavelength, and inputting the images into the trained pest automatic classification and identification model to realize pest automatic classification and identification;

[0014] Furthermore, the step S1 includes the following sub-steps:

[0015] S101, using a spectrum analyzer to collect spectrum data containing information on rice diseases and insect pests;

[0016] S102, using the CARS algorithm, the partial least squares regression algorithm (PLSR) or the SPA algorithm to screen and extract characteristic bands from the collected spectral data.

[0017] Furthermore, the laser-enhanced irradiation automatic pest classification and identification camera system includes a laser enhancement module, which is used to emit lasers of different wavelengths to evenly irradiate the target leaves and ensure that the power, spot size, irradiation angle and irradiation distance of lasers of different wavelengths are consistent; an image acquisition module, which is used to acquire laser-enhanced images of the target leaves under irradiation of lasers of different wavelengths.

[0018] The laser enhancement module includes: a laser wavelength conversion device, a laser emitter, a laser optical path adjustment device and a laser diffusion device. The laser wavelength conversion device freely selects to emit lasers of different wavelengths by controlling the level of laser emitters of different wavelengths, and makes different lasers have the same power; the number of laser emitters corresponds to the number of bands required, the wavelength of the laser corresponds to the selected characteristic band, and the laser optical path of the laser emitter is set to be parallel and in the same direction. The laser emitted by the laser emitter passes through the laser optical path adjustment device, so that the laser emitters at different positions have the same irradiation angle and irradiation distance when irradiating the target blade; the laser optical path adjustment device uses a reflector to make the optical paths of lasers of different wavelengths consistent; a reflector is set in the optical path of the lasers emitted by different laser emitters so that the reflected light of different lasers overlaps, and the reflector is fixed by a hinge device so that the reflector can rotate. When different laser emitters are working, the reflectors of the remaining optical paths rotate outside the optical path; a laser diffusion device is set between the laser optical path adjustment device and the target blade so that the laser irradiates the target blade evenly, and makes different lasers have the same spot size;

[0019] The image acquisition module includes: an optical filter and a CCD camera; the CCD camera is used in conjunction with the optical filter to capture the image of the target leaf under laser irradiation;

[0020] Furthermore, the laser wavelength conversion device adopts any one of a push button switch, a rotary switch or a touch screen button.

[0021] Furthermore, the laser diffusion device adopts any one of an optical diffuser, a fiber optic diffuser and a beam shaper.

[0022] Furthermore, the optical filter is any one of an interference filter and a polarization filter, which is used to block light of other wavelengths and improve the shooting effect of the CCD camera.

[0023] Furthermore, the step S3 includes the following sub-steps:

[0024] S301, using a camera under windless, fixed external light experimental conditions, setting different laser irradiation angles, external light intensities, number and location of pests, and collecting images of normal and pest-infested leaves to increase the robustness of the model;

[0025] S302, preprocessing the collected images, including cropping and resizing, to reduce noise and improve the learning effect of the model;

[0026] S303, dividing the data set into a training set, a validation set and a test set according to the ratio of 8:1:1.

[0027] Furthermore, the automatic pest classification and identification model adopts the ShuffleNetV2-1.5x lightweight network model, and the network structure is as follows: an image X1 with a length of H, a width of W, and a number of channels of 3 is input, and first undergoes 24 convolution operations with a convolution kernel size of 3*3, a number of channels of 3, and a step size of 2 to obtain a feature map X2 of (H / 2)*(W / 2)*24; then, after a maximum pooling operation with a convolution kernel size of 3*3 and a step size of 2, a drawing map X3 of (H / 4)*(W / 4)*24 is obtained; then, after 1 C1 module, a feature map X4 of (H / 8)*(W / 8)*176 is obtained, and after 3 C2 modules, a feature map X5 of (H / 8)*(W / 8)*176 is obtained. The feature map X5 of 176 is obtained after 1 C1 module to obtain the feature map X6 of (H / 16)*(W / 16)*352; then after 7 C2 modules, the feature map X7 of (H / 16)*(W / 16)*352 is obtained, and after 1 C1 module, the feature map X8 of (H / 32)*(W / 32)*704 is obtained; finally, after 3 C2 modules, the feature map X9 of (H / 32)*(W / 32)*704 is obtained, and after 1024 convolution operations with a convolution kernel size of 1*1 and a step size of 1, the feature map X10 of (H / 32)*(W / 32)*1024 is obtained, and after global pooling with a convolution kernel size of 7*7, a feature map of 1*1 is obtained. The feature map passes through the fully connected layer (also called the classification layer) to convert the feature map into a score for each category.

[0028] The specific operation of the C1 module is as follows: the input feature image needs to pass through two branches. In branch 1, it first passes through a separable convolution with a convolution kernel size of 3*3 and a step size of 2, passes through a BN layer, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. In branch 2, it first passes through a convolution kernel size of 1*1, passes through BN and ReLU, passes through a convolution kernel size of 3*3 and a step size of 2, passes through BN, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. The two branches are then stacked and Channel Shuffled.

[0029] The specific operation of the C2 module is as follows: the input feature image must first undergo a Channel Split operation to obtain branches 1 and 2 with the number of channels being 1 / 2 of the input feature image. Branch 1 first undergoes a convolution with a convolution kernel size of 1*1, then BN and ReLU, then a convolution with a convolution kernel size of 3*3 and a step size of 2, then BN, then a convolution with a convolution kernel size of 1*1, and finally BN and ReLU operations, and then is stacked and Channel Shuffled with branch 1.

[0030] Furthermore, the specific method of S4 is as follows:

[0031] First, the pest datasets under different laser wavelengths are input into the pest automatic classification and recognition model. The output results are passed through the activation function to generate the probability distribution of each category, and then compared with the true label. The cross entropy loss function is used to calculate the loss, and the network weights are updated according to this loss. Finally, gradient descent or its variants are used to minimize the loss function to train the network. The pest classification accuracy of each dataset after model detection is compared, and the laser wavelength corresponding to the dataset with the highest accuracy is selected as the laser wavelength used for subsequent detection.

[0032] On the other hand, the present invention provides an automatic pest classification and identification system based on laser enhanced images, comprising a classification wavelength selection module, an automatic pest classification and identification camera system, a data set construction module, a classification and identification module, and a model optimization module:

[0033] The classification wavelength selection module selects a suitable classification wavelength using a characteristic band extraction algorithm according to the reflection bands of different pests;

[0034] The automatic pest classification and identification camera system is equipped with laser transmitters of different wavelengths for collecting laser-enhanced pest images;

[0035] The data set construction module uses the camera of the automatic pest classification and identification camera system to collect images including normal and pest leaves according to the classification wavelength determined by the classification wavelength selection module to construct the pest data set;

[0036] The classification and recognition module is used to classify and recognize pests in different data sets through an automatic pest classification and recognition model;

[0037] The model optimization module uses the pest data set established by the data set construction module to perform pest classification training and testing on the pest automatic classification and recognition model, and continuously adjusts and optimizes the model; compares the pest classification accuracy of each data set after model detection, selects the laser wavelength corresponding to the data set with the highest accuracy as the optimal laser wavelength, and uses the corresponding model as the final pest automatic classification and recognition model.

[0038] After the model optimization module determines the optimal laser wavelength, the pest automatic classification and identification camera system uses the optimal laser wavelength to enhance the image of the pest to be detected, and inputs it into the final pest automatic classification and identification model trained by the model optimization module to realize pest automatic classification and identification.

[0039] The beneficial effects of the present invention are as follows:

[0040] The laser-enhanced automatic pest classification and identification system proposed in the present invention utilizes laser irradiation of a specific wavelength to enhance the differences between different insect bodies to improve the accuracy of pest identification and classification. Combined with the automatic identification and classification network, the system can automatically identify and classify different types of rice pests and diseases, and has broad application prospects.

[0041] The present invention combines spectral technology with deep learning image recognition technology to apply to the identification and classification of pests, innovatively solving the technical problem of small differences in pest appearance and unclear features that are difficult to distinguish. The invention can help users more efficiently count the number of different red seas, draw insect curves, and grasp the development dynamics of pest numbers in real time, providing data support for the formulation of accurate prevention and control strategies. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a flow chart of a method according to an embodiment of the present invention.

[0043] Figure 2 It is a schematic diagram of the structure of an automatic classification and recognition camera system according to an embodiment of the present invention.

[0044] Figure 3 This is the structure diagram of the ShuffleNetV2-1.5x lightweight network model.

[0045] Figure 4 It is a schematic diagram of the structure of the laser optical path adjustment device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to make the technical solution of the present invention clearer, the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0047] The following is a more detailed implementation method:

[0048] like Figure 1 As shown, a method for automatic classification and identification of insect pests based on laser enhanced images comprises the following steps:

[0049] S1. According to the reflection bands of different pests, use the characteristic band extraction algorithm to select the appropriate classification wavelength;

[0050] S101 uses a spectrum analyzer to collect spectral data containing information on rice pests and diseases;

[0051] S102 uses CARS algorithm, partial least squares regression algorithm (PLSR) or SPA algorithm to screen and extract characteristic bands from the collected spectral data.

[0052] S2. Design a camera system for automatic classification and identification of insect pests using laser-enhanced irradiation;

[0053] The structure of the automatic classification and recognition camera system is as follows Figure 2 As shown:

[0054] The automatic classification and recognition camera system includes the following modules: laser enhancement module: used to emit lasers of different wavelengths to evenly irradiate the target leaves and ensure that the power, spot size, irradiation angle, irradiation distance, etc. of lasers of different wavelengths are consistent; image acquisition module: used to collect laser-enhanced images of target leaves under irradiation of lasers of different wavelengths, requiring clear image quality without being disturbed by external light and other factors.

[0055] The laser enhancement module includes: a laser wavelength conversion device 1, a laser emitter 2, a laser optical path adjustment device 3 and a laser diffusion device 4. The laser wavelength conversion device 1 can be a push button switch, a rotary switch, a touch screen button or other devices. By controlling the level of the laser emitters 2 of different wavelengths, it can freely choose to emit lasers of different wavelengths, and make different lasers have the same power; the number of laser emitters 2 corresponds to the number of bands required, the wavelength of the laser corresponds to the selected characteristic band, and the laser optical path of the laser emitter is set to be parallel and in the same direction. The laser emitted by the laser emitter 2 passes through the laser optical path adjustment device 3, so that the laser emitters 2 at different positions have the same irradiation angle and irradiation distance when irradiating the target blade; Figure 4As shown, the laser optical path adjustment device 3 is a combination of reflectors, which are used to make the optical paths of lasers of different wavelengths consistent; a reflector is set in the optical paths of lasers emitted by different laser emitters to make the reflected light of different lasers overlap, and the reflector is fixed by a hinge device so that the reflector can rotate, and when different laser emitters are working, the reflectors of the remaining optical paths are rotated outside the optical path; a laser diffusion device 4 is set between the laser optical path adjustment device 3 and the target blade so that the laser is evenly irradiated to the target blade, and different lasers have the same spot size; the laser diffusion device 4 can be an optical diffuser, an optical fiber diffuser, a beam shaper, etc.

[0056] The image acquisition module includes: an optical filter and a CCD camera; the CCD camera 5 is used in conjunction with the optical filter 6 to capture the target leaf image under laser irradiation. The optical filter 6 is an interference filter or a polarization filter, etc., which is used to block light of other wavelengths and improve the shooting effect of the CCD camera 5.

[0057] The specific operations are as follows:

[0058] S201, adjusting the laser wavelength conversion device to freely control laser emitters with different wavelengths;

[0059] S202, the laser emitted by the laser emitter passes through the laser optical path adjustment device, so that the laser emitters at different positions have the same angle and light intensity when irradiating the target blade;

[0060] S203, adding a laser diffusion device between the laser optical path adjustment device and the target blade so that the laser is evenly irradiated to the target blade;

[0061] S204, using a CCD camera in conjunction with a filter device to capture an image of the target leaf under laser irradiation;

[0062] S3. Based on the characteristic bands selected in S1, use a camera to collect images of normal and pest-infested leaves under laser irradiation of different wavelengths, and construct pest datasets under different laser wavelengths to ensure that the datasets cover various angles, lighting conditions, and pest levels to increase the robustness of the model.

[0063] S301, using a camera under windless, fixed external light experimental conditions, setting different laser irradiation angles, external light intensities, number and location of pests, and collecting images of normal and pest-infested leaves to increase the robustness of the model;

[0064] S302, preprocessing the collected images, including cropping the images to remove areas in the images that are not related to the target object; adjusting the image size to adjust all images to a uniform resolution to meet the requirements of the model input layer and reduce the computational burden caused by inconsistent image sizes to improve the learning effect of the model.

[0065] S303, dividing the data set into a training set, a validation set and a test set according to the ratio of 8:1:1.

[0066] S4, using the pest data set established in S3, using the pest automatic classification and recognition model to perform pest classification tests, continuously adjusting and optimizing the model, and determining the optimal laser wavelength;

[0067] The automatic pest classification and identification model adopts the ShuffleNetV2-1.5x lightweight network model, such as Figure 3 As shown, the network structure is as follows: input image X1 with length H, width W and number of channels 3, after 24 convolution operations with kernel size 3*3, number of channels 3 and step size 2, the feature map X2 of (H / 2)*(W / 2)*24 is obtained, after the maximum pooling operation with kernel size 3*3 and step size 2, the drawing map X3 of (H / 4)*(W / 4)*24 is obtained, after 1 C1 module, the feature map X4 of (H / 8)*(W / 8)*176 is obtained, after 3 C2 modules, the feature map X5 of (H / 8)*(W / 8)*176 is obtained, after 1 C1 module, the feature map X6 of (H / 8)*(W / 8)*176 is obtained, The feature map X6 of (H / 16)*(W / 16)*352 is obtained after 7 C2 modules, the feature map X7 of (H / 16)*(W / 16)*352 is obtained, the feature map X8 of (H / 32)*(W / 32)*704 is obtained after 1 C1 module, the feature map X9 of (H / 32)*(W / 32)*704 is obtained after 3 C2 modules, the feature map X10 of (H / 32)*(W / 32)*1024 is obtained after 1024 convolution operations with a kernel size of 1*1 and a step size of 1, and the feature map X10 of 1*1 is obtained after global pooling with a convolution kernel size of 7*7. The feature map passes through the fully connected layer (also called the classification layer) to convert the feature map into a score for each category.

[0068] The C1 module is as follows: the input feature image needs to pass through two branches. In branch 1, it first passes through a separable convolution with a convolution kernel size of 3*3 and a stride of 2, passes through a BN layer, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. In branch 2, it first passes through a convolution kernel size of 1*1, passes through BN and ReLU, passes through a convolution kernel size of 3*3 and a stride of 2, passes through BN, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. The two branches are then stacked and Channel Shuffled.

[0069] The specific operation of the C2 module is as follows: the input feature image must first undergo a Channel Split operation to obtain branches 1 and 2 with the number of channels being 1 / 2 of the input feature image. Branch 1 first undergoes a convolution with a convolution kernel size of 1*1, then BN and ReLU, then a convolution with a convolution kernel size of 3*3 and a step size of 2, then BN, then a convolution with a convolution kernel size of 1*1, and finally BN and ReLU operations, and then is stacked and Channel Shuffled with branch 1.

[0070] The training process is as follows:

[0071] First, the pest datasets under different laser wavelengths are input into the pest automatic classification and recognition model. The output results are passed through the activation function to generate the probability distribution of each category, and then compared with the true label. The cross entropy loss function is used to calculate the loss, and the network weights are updated according to this loss. Finally, gradient descent or its variants are used to minimize the loss function to train the network. The pest classification accuracy of each dataset after model detection is compared, and the laser wavelength corresponding to the dataset with the highest accuracy is selected as the laser wavelength used for subsequent detection.

[0072] S5. Use the pest automatic classification and identification camera system to take images of pests to be detected after enhancement with the optimal laser wavelength, and input the images into the trained pest automatic classification and identification model to realize pest automatic classification and identification.

[0073] On the other hand, the present invention provides an automatic pest classification and identification system based on laser enhanced images, comprising a classification wavelength selection module, an automatic pest classification and identification camera system, a data set construction module, a classification and identification module, and a model optimization module:

[0074] The classification wavelength selection module selects a suitable classification wavelength using a characteristic band extraction algorithm according to the reflection bands of different pests; the specific operation is as follows:

[0075] First, a spectrum analyzer is used to collect spectral data containing information on rice pests and diseases; then the CARS algorithm, partial least squares regression algorithm (PLSR) or SPA algorithm is used to screen and extract characteristic bands from the collected spectral data.

[0076] The automatic pest classification and identification camera system is equipped with laser transmitters of different wavelengths for collecting laser-enhanced pest images;

[0077] The automatic pest classification and identification camera system includes a laser enhancement module, which is used to emit lasers of different wavelengths to evenly irradiate target leaves and ensure that the power, spot size, irradiation angle and irradiation distance of lasers of different wavelengths are consistent; an image acquisition module, which is used to acquire laser-enhanced images of target leaves under irradiation of lasers of different wavelengths.

[0078] The laser enhancement module comprises: a laser wavelength conversion device 1, a laser emitter 2, a laser optical path adjustment device 3 and a laser diffusion device 4. The laser wavelength conversion device 1 freely selects to emit lasers of different wavelengths by controlling the level of laser emitters 2 of different wavelengths, and makes different lasers have the same power; the number of laser emitters 2 corresponds to the number of bands required, the wavelength of the laser corresponds to the selected characteristic band, and the laser optical paths of the laser emitters are set to be parallel and in the same direction. The laser emitted by the laser emitter 2 passes through the laser optical path adjustment device 3, so that the laser emitters 2 at different positions have the same irradiation angle and irradiation distance when irradiating the target blade. The laser optical path adjustment device 3 uses a reflector to make the optical paths of lasers of different wavelengths consistent; a reflector is set in the optical path of the lasers emitted by different laser emitters so that the reflected light of different lasers overlaps, and the reflector is fixed by a hinge device so that the reflector can rotate. When different laser emitters are working, the reflectors of the remaining optical paths are rotated outside the optical path; a laser diffusion device 4 is set between the laser optical path adjustment device 3 and the target blade so that the laser irradiates the target blade evenly and makes different lasers have the same spot size;

[0079] The image acquisition module includes: an optical filter and a CCD camera; the CCD camera 5 is used in conjunction with the optical filter 6 to capture the image of the target leaf under laser irradiation;

[0080] Furthermore, the laser wavelength conversion device 1 adopts any one of a push button switch, a rotary switch or a touch screen button.

[0081] Furthermore, the laser diffusion device 4 is any one of an optical diffuser, a fiber optic diffuser and a beam shaper.

[0082] Furthermore, the optical filter 6 is any one of an interference filter and a polarization filter, which is used to block light of other wavelengths and improve the shooting effect of the CCD camera 5.

[0083] The data set construction module uses the camera of the automatic pest classification and identification camera system to collect images of normal and pest leaves according to the classification wavelength determined by the classification wavelength selection module to construct the pest data set; the specific operations are as follows:

[0084] First, the camera was used to collect images of normal and infested leaves under windless and fixed ambient light conditions, with different laser irradiation angles, ambient light intensities, and pest numbers and locations, to increase the robustness of the model.

[0085] Then the collected images are preprocessed, including cropping and resizing, to reduce noise and improve the learning effect of the model;

[0086] Finally, the dataset is divided into training set, validation set and test set according to the ratio of 8:1:1.

[0087] The classification and recognition module is used to classify and recognize pests in different data sets through an automatic pest classification and recognition model;

[0088] The automatic classification and identification model of insect pests adopts the ShuffleNetV2-1.5x lightweight network model, and the network structure is as follows: input an image X1 with a length of H, a width of W, and a number of channels of 3, first undergoes 24 convolution operations with a convolution kernel size of 3*3, a number of channels of 3, and a step size of 2 to obtain a feature map X2 of (H / 2)*(W / 2)*24; then undergoes a maximum pooling operation with a convolution kernel size of 3*3 and a step size of 2 to obtain a drawing map X3 of (H / 4)*(W / 4)*24; then, after passing through 1 C1 module, a feature map X4 of (H / 8)*(W / 8)*176 is obtained, and after passing through 3 C2 modules, a feature map X4 of (H / 8)*(W / 8)*176 is obtained. The feature map X5 is obtained by passing through 1 C1 module to obtain the feature map X6 of (H / 16)*(W / 16)*352; then it passes through 7 C2 modules to obtain the feature map X7 of (H / 16)*(W / 16)*352, and then it passes through 1 C1 module to obtain the feature map X8 of (H / 32)*(W / 32)*704; finally, it passes through 3 C2 modules to obtain the feature map X9 of (H / 32)*(W / 32)*704, and after 1024 convolution operations with a convolution kernel size of 1*1 and a step size of 1, it obtains the feature map X10 of (H / 32)*(W / 32)*1024, and after global pooling with a convolution kernel size of 7*7, it obtains a 1*1 feature map. The feature map passes through the fully connected layer (also called the classification layer) to convert the feature map into a score for each category.

[0089] The specific operation of the C1 module is as follows: the input feature image needs to pass through two branches. In branch 1, it first passes through a separable convolution with a convolution kernel size of 3*3 and a step size of 2, passes through a BN layer, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. In branch 2, it first passes through a convolution kernel size of 1*1, passes through BN and ReLU, passes through a convolution kernel size of 3*3 and a step size of 2, passes through BN, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations. The two branches are then stacked and Channel Shuffled.

[0090] The specific operation of the C2 module is as follows: the input feature image must first undergo a Channel Split operation to obtain branches 1 and 2 with the number of channels being 1 / 2 of the input feature image. Branch 1 first undergoes a convolution with a convolution kernel size of 1*1, then BN and ReLU, then a convolution with a convolution kernel size of 3*3 and a step size of 2, then BN, then a convolution with a convolution kernel size of 1*1, and finally BN and ReLU operations, and then is stacked and Channel Shuffled with branch 1.

[0091] The model optimization module uses the pest data set established by the data set construction module to perform pest classification training and testing on the pest automatic classification and recognition model, and continuously adjust and optimize the model; compare the pest classification accuracy of each data set after model detection, select the laser wavelength corresponding to the data set with the highest accuracy as the optimal laser wavelength, and use the corresponding model as the final pest automatic classification and recognition model. The specific method is as follows:

[0092] First, the pest datasets under different laser wavelengths are input into the pest automatic classification and recognition model. The output results are passed through the activation function to generate the probability distribution of each category, and then compared with the true label. The cross entropy loss function is used to calculate the loss, and the network weights are updated according to this loss. Finally, gradient descent or its variants are used to minimize the loss function to train the network. The pest classification accuracy of each dataset after model detection is compared, and the laser wavelength corresponding to the dataset with the highest accuracy is selected as the laser wavelength used for subsequent detection.

[0093] After the model optimization module determines the optimal laser wavelength, the pest automatic classification and identification camera system uses the optimal laser wavelength to enhance the image of the pest to be detected, and inputs it into the final pest automatic classification and identification model trained by the model optimization module to realize pest automatic classification and identification.

[0094] Example

[0095] Table 1

[0096]

[0097] As shown in Table 1, the above experiment used three rice planthoppers (brown planthopper, gray planthopper, white-backed planthopper) as the experimental objects, with a white board as the background, and collected two sets of data sets using natural light and 430nm wavelength laser enhancement, each with 900 images, and the data sets were divided into 70% training set, 20% validation set and 10% test set. Using the Pytorch 1.7.0 framework, the input image size of the model is 608×608, the learning rate is set to 0.001, the ADAM learning rate optimizer is used, the batch size is 4, and the number of iterations is 250.

[0098] The experimental results are shown in the figure. The recognition accuracy of the model using the 430nm wavelength enhanced dataset is significantly higher than that of the model using the natural light irradiation dataset. This can be preliminarily verified that the use of laser enhancement technology can help solve the technical problem of small differences in pest appearance and unclear features that are difficult to distinguish.

[0099] The above embodiments are only used to clearly illustrate the technical solutions of the present invention, rather than to limit the invention. Through the detailed description of the above embodiments, relevant staff can make various modifications without departing from the content of the present invention. Any modification, replacement and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A method for automatic classification and identification of insect pests based on laser enhanced images, characterized in that: The following steps are involved: S1. According to the reflection bands of different pests, use the characteristic band extraction algorithm to select the appropriate classification wavelength; S2. Design a laser-enhanced camera system for automatic classification and identification of insect pests; S3. Based on the characteristic bands selected in S1, use a camera to collect images of normal and pest-infested leaves under laser irradiation of different wavelengths, and construct pest datasets under different laser wavelengths to ensure that the datasets cover various angles, lighting conditions, and pest levels to increase the robustness of the model. S4, using the pest data set established in S3, using the pest automatic classification and recognition model to perform pest classification tests, continuously adjusting and optimizing the model, and determining the optimal laser wavelength; S5. Use the pest automatic classification and identification camera system to take images of pests to be detected after enhancement with the optimal laser wavelength, and input the images into the trained pest automatic classification and identification model to realize pest automatic classification and identification.

2. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 1, characterized in that: The step S1 includes the following sub-steps: S101, using a spectrum analyzer to collect spectrum data containing information on rice diseases and insect pests; S102, using CARS algorithm, partial least squares regression algorithm PLSR or SPA algorithm to screen and extract characteristic bands from the collected spectral data.

3. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 1, characterized in that: The laser-enhanced irradiation automatic pest classification and identification camera system includes a laser enhancement module, which is used to emit lasers of different wavelengths to evenly irradiate the target leaves and ensure that the power, spot size, irradiation angle and irradiation distance of the lasers of different wavelengths are consistent; An image acquisition module, used for acquiring laser-enhanced images of target leaves irradiated by lasers of different wavelengths; The laser enhancement module comprises: a laser wavelength conversion device, a laser emitter, a laser optical path adjustment device and a laser diffusion device; the laser wavelength conversion device freely selects to emit lasers of different wavelengths by controlling the level of laser emitters of different wavelengths, and makes different lasers have the same power; the number of laser emitters corresponds to the number of bands required to be obtained, the wavelength of the laser corresponds to the selected characteristic band, and the laser optical path of the laser emitter is set to be parallel and in the same direction; the laser emitted by the laser emitter passes through the laser optical path adjustment device, so that the laser emitters at different positions have the same irradiation angle and irradiation distance when irradiating the target blade, and the laser optical path adjustment device uses a reflector to make the optical paths of lasers of different wavelengths consistent; a reflector is set in the optical path of the lasers emitted by different laser emitters so that the reflected light of different lasers overlaps, and the reflector is fixed by a hinge device so that the reflector can rotate, and when different laser emitters are working, the reflectors of the remaining optical paths rotate outside the optical path; a laser diffusion device is set between the laser optical path adjustment device and the target blade so that the laser is evenly irradiated to the target blade, and different lasers have the same spot size; The image acquisition module comprises: an optical filter and a CCD camera; the CCD camera is used in conjunction with the optical filter to capture the image of the target leaf under laser irradiation.

4. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 3, characterized in that: The laser wavelength conversion device adopts any one of a push button switch, a rotary switch or a touch screen button.

5. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 3, characterized in that: The laser diffusion device adopts any one of an optical diffuser, a fiber optic diffuser and a beam shaper.

6. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 3, characterized in that: The optical filter is any one of an interference filter and a polarization filter.

7. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 1 or 3, characterized in that: The step S3 includes the following sub-steps: S301, using a camera under windless, fixed external light experimental conditions, setting different laser irradiation angles, external light intensities, number and location of insect pests, and collecting images of normal and insect-infested leaves; S302, preprocessing the collected images, including cropping and resizing, to reduce noise and improve the learning effect of the model; S303, dividing the data set into a training set, a validation set and a test set according to the ratio of 8:1:

1.

8. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 1, characterized in that: The automatic classification and identification model of insect pests adopts the ShuffleNetV2-1.5x lightweight network model, and the network structure is as follows: an image X1 with a length of H, a width of W, and a number of channels of 3 is input, and first undergoes 24 convolution operations with a convolution kernel size of 3*3, a number of channels of 3, and a step length of 2 to obtain a feature map X2 of (H / 2)*(W / 2)*24; then undergoes a maximum pooling operation with a convolution kernel size of 3*3 and a step length of 2 to obtain a drawing map X3 of (H / 4)*(W / 4)*24; then undergoes a C1 module to obtain a feature map X4 of (H / 8)*(W / 8)*176, and undergoes 3 C2 modules to obtain a feature map X5 of (H / 8)*(W / 8)*176, and then undergoes a C 1 module obtains the feature map X6 of (H / 16)*(W / 16)*352; then it passes through 7 C2 modules to obtain the feature map X7 of (H / 16)*(W / 16)*352, and passes through 1 C1 module to obtain the feature map X8 of (H / 32)*(W / 32)*704; finally, it passes through 3 C2 modules to obtain the feature map X9 of (H / 32)*(W / 32)*704, and after 1024 convolution operations with a convolution kernel size of 1*1 and a step size of 1, it obtains the feature map X10 of (H / 32)*(W / 32)*1024, and after global pooling with a convolution kernel size of 7*7, it obtains a 1*1 feature map; the feature map passes through the fully connected layer to convert the feature map into the score of each category; The specific operation of the C1 module is as follows: the input feature image needs to pass through two branches. In branch 1, it first passes through a separable convolution with a convolution kernel size of 3*3 and a step size of 2, passes through a BN layer, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations; in branch 2, it first passes through a convolution kernel size of 1*1, passes through BN and ReLU, passes through a convolution kernel size of 3*3 and a step size of 2, passes through BN, then passes through a convolution kernel size of 1*1, and finally passes through BN and ReLU operations; then the two branches are stacked and Channel Shuffled; The specific operation of the C2 module is as follows: the input feature image must first undergo a Channel Split operation to obtain branches 1 and 2 with the number of channels being 1 / 2 of the input feature image. Branch 1 first undergoes a convolution with a convolution kernel size of 1*1, then BN and ReLU, then a convolution with a convolution kernel size of 3*3 and a step size of 2, then BN, then a convolution with a convolution kernel size of 1*1, and finally BN and ReLU operations, and then is stacked and Channel Shuffled with branch 1.

9. The method for automatic classification and identification of insect pests based on laser enhanced images according to claim 1 or 8, characterized in that: The specific method of S4 is as follows: First, the pest datasets under different laser wavelengths are input into the pest automatic classification and recognition model. The output results are passed through the activation function to generate the probability distribution of each category, which is then compared with the true label. The cross entropy loss function is used to calculate the loss, and the network weights are updated based on this loss. Finally, gradient descent or its variants are used to minimize the loss function to train the network. The pest classification accuracy of each dataset after model detection is compared, and the laser wavelength corresponding to the dataset with the highest accuracy is selected as the laser wavelength used for subsequent detection.

10. An automatic pest classification and identification system based on laser enhanced images, characterized in that: It includes classification wavelength selection module, pest automatic classification and identification camera system, data set construction module, classification and identification module and model optimization module: The classification wavelength selection module selects a suitable classification wavelength using a characteristic band extraction algorithm according to the reflection bands of different pests; The automatic pest classification and identification camera system is equipped with laser transmitters of different wavelengths for collecting laser-enhanced pest images; The data set construction module uses the camera of the automatic pest classification and identification camera system to collect images including normal and pest leaves according to the classification wavelength determined by the classification wavelength selection module to construct the pest data set; The classification and recognition module is used to classify and recognize pests in different data sets through an automatic pest classification and recognition model; The model optimization module uses the pest data set established by the data set construction module to perform pest classification training and testing on the pest automatic classification and recognition model, and continuously adjusts and optimizes the model; compares the pest classification accuracy of each data set after model detection, selects the laser wavelength corresponding to the data set with the highest accuracy as the optimal laser wavelength, and uses the corresponding model as the final pest automatic classification and recognition model; After the model optimization module determines the optimal laser wavelength, the pest automatic classification and identification camera system uses the optimal laser wavelength to enhance the image of the pest to be detected, and inputs it into the final pest automatic classification and identification model trained by the model optimization module to realize pest automatic classification and identification.