Open Access Paper
11 September 2023 Research on intelligent insect species identification based on computer vision
Bin Huang
Author Affiliations +
Proceedings Volume 12779, Seventh International Conference on Mechatronics and Intelligent Robotics (ICMIR 2023); 127792J (2023) https://doi.org/10.1117/12.2689469
Event: Seventh International Conference on Mechatronics and Intelligent Robotics (ICMIR 2023), 2023, Kunming, China
Abstract
Image-based insect species identification is a comprehensive application of computer vision technology, image processing technology and pattern recognition technology to realize insect species identification. It is of great significance to find and identify crop insects in time and quickly, so as to take corresponding measures to prevent and control pests in time and reduce the losses caused by pests. In this paper, intelligent insect species identification based on computer vision is studied. For insect images, using feature fusion technology will obtain more comprehensive insect image features, which will greatly improve the recognition accuracy and improve the recognition efficiency of the system. In the learning process, firstly, a certain number of insect images are selected as training samples, and the feature vectors of insects are extracted as the input vectors of SVM (Support Vector Machine) training, and the input vectors are learned to get the best classification model. The experimental results show that the average recognition rate of insects by feature fusion is 94.747%. The experimental results show that the research results of this paper provide theoretical and practical basis for intelligent insect species recognition technology based on computer vision.

1.

INTRODUCTION

With the continuous development of big data technology AI technology, people’s lives are constantly changing due to the development of technology. Children in life often ask adults something they are curious about and don’t know, such as insects. Traditional insect species identification is time-consuming and laborious, and its accuracy is not high, which seriously affects the development of insect control work in the later period. Computer vision technology is a fast and effective method to detect the number of insects 1. Using computer vision technology to identify insects in the actual environment is a very important and challenging job.

Image-based insect species identification is a comprehensive application of computer vision technology, image processing technology and pattern recognition technology to realize insect species identification 2-3. Literature 4 takes pictures vertically downward from the top of corn plants to obtain the image of the uppermost leaf of corn, and puts forward a new image processing algorithm, which can identify the upper leaf damaged by corn borer. Literature 5 puts forward a fast algorithm of expansion and corrosion to extract the skeleton features of diseases and pests, and uses neural network to identify diseases and pests according to the geometric moment features of different kinds of diseases and pests skeletons. Document 6 extracted the characteristics of shape, compactness, roundness, height ratio and so on, and used artificial neural network to classify and identify 12 common cotton pests. The accuracy rate of 11 pests identification reached 90%, and the accuracy rate of one pest identification reached 72%. Literature 7 extracted the characteristic vectors of plant seeds, such as color vector, seed perimeter, area size, weight, width, concave-convex area perimeter of shell, aspect ratio, area perimeter ratio and so on, to identify the seeds.

Nowadays, the development of image processing and recognition technology makes it possible to accurately identify insects. It is of great significance to find and identify crop insects in time and quickly, so as to take corresponding measures to prevent and control pests in time and reduce the losses caused by pests 8-9. Most insects are identified manually by insect experts or scholars in related fields, and their accuracy depends on the professional level of relevant investigation experts, and the existing experts and professionals in entomology field can not meet the practical application needs of various scenarios, so this method has great limitations. In the study of this paper, the global features of insects such as color, shape and texture and the local features of HOG (Histograms of Oriented Gradients) are extracted, and SVM is used to construct a classifier for the specified species of insects, and the classification recognition rate of the classifier based on feature fusion is discussed. The experimental results show that the research results of this paper provide a theoretical and practical basis for intelligent insect species identification technology based on computer vision.

2.

RESEARCH METHOD

2.1

Feature extraction of insect image

After the original image is preprocessed to get the segmented image, we also need to describe the attributes of the object so that the computer can understand the segmented image and then distinguish and classify it. The attributes of an object are called features, and the process of describing an object is called feature extraction. Feature extraction is the most critical link in image recognition, which strongly affects the design and performance of classifier. In traditional insect taxonomy, the body structure of insects, such as body length and size, is an important basis for identification and classification, and these characteristics generally belong to the description of shape characteristics.

Generally speaking, when computer vision technology is used to identify insects, it is necessary to convert color images into gray images, and the quality of converting color images into gray images will significantly affect the image recognition effect of insects. In this paper, four commonly used methods of converting color images into gray images are compared with the newly proposed color channel comparison method to show the advantages of the new method.

Color feature is the most widely used visual feature in image retrieval. The main reason is that color is often very related to the objects or scenes contained in the image. To extract color features, we must choose a suitable color space to calculate color features and choose a suitable method to quantify color features 10. Color features are rotation invariant and scale invariant, which are insensitive to complex background, image size and orientation, and show strong robustness.

Color moment is a very simple and effective color feature. Compared with color histogram, another advantage of this method is that there is no need to vectorize the feature. The mathematical expression of the three low-order moments of color is:

00131_PSISDG12779_127792J_page_2_1.jpg
00131_PSISDG12779_127792J_page_2_2.jpg
00131_PSISDG12779_127792J_page_2_3.jpg

Where pij is the value of the i color component of the j pixel in the image, and N is the number of pixels. Therefore, the color moment of the image only needs 9 components, which is very concise compared with other color features.

Morphological characteristics are a kind of characteristics that describe objects intuitively, and it is one of the important ways to distinguish different kinds of insects in traditional insect taxonomy. Eccentricity describes the compactness of a region in a certain length, and the general method to calculate eccentricity is to find the ratio of the major axis to the minor axis of the boundary. It can be seen that eccentricity can roughly distinguish slender objects from more square objects.

00131_PSISDG12779_127792J_page_3_1.jpg

Among them, W is the sum of the trunk length and twice the wing length, and L is the body length.

The image descriptor used by HOG for human target detection can well represent the gradient intensity and gradient direction distribution in the local area of the image 11. Let the number of cells be λ, the number of directions in each cell be β, and the number of blocks be δ, then the final feature vector dimension of the image is:

00131_PSISDG12779_127792J_page_3_2.jpg

The sample image used in this paper is adjusted to the size of 64×128, and the overlap rate of block blocks is set to 50%. The HOG feature of the gray image is calculated, and finally the HOG feature of the insect image is 108 dimensions.

Insect species identification based on texture features. Texture is an attribute that reflects the spatial distribution of pixel gray level in a region and is an important factor to describe the characteristics of objects. The run-length of a certain gray value is generally defined as the number of pixels that are continuous, collinear and have the same gray value in the detected area. At present, many scholars use gray value run-length matrix to express texture features and realize insect recognition, but the application of other texture feature operators has not been studied.

Texture features describe the spatial distribution law of domain gray level of pixels in an image. Different species of insects have different texture features, and texture feature analysis is an important research content of insect species identification. Micro-filtering calculation is carried out with a template in a 3×3 or 5×5 window, and the sum of convolution is taken as the output new image, and then each pixel value in the convolved image is replaced by the mean square error or absolute value average in a 20×20 local window centered on the pixel.

Carrying out two-dimensional Fourier transform on the image;

00131_PSISDG12779_127792J_page_3_3.jpg

According to the separation characteristics of two-dimensional Fourier transform:

00131_PSISDG12779_127792J_page_3_4.jpg

According to the above separation form, two-dimensional Fourier transform can be realized by applying one-dimensional Fourier transform twice.

2.2

Intelligent insect species identification

In the process of feature extraction, we always extract as many parameters as possible to describe the features of objects as completely as possible. However, from the method of feature extraction, many features are not independent and redundant. The result of feature optimization affects the performance of the classifier. A good feature optimization result set will make the classifier easy to design, while a poor feature optimization result set will make the classifier judge the classification for a long time and increase the misjudgment rate. The performance of classifier directly determines the overall performance of classification and recognition system, so the design of classifier is very important.

Transplanting content-based image retrieval into insect image recognition application can easily realize insect image recognition and comparison. However, due to the one-sidedness of a single feature extraction method, the expected effect cannot be achieved by using only one feature extraction method. For insect images, using feature fusion technology will obtain more comprehensive insect image features, which will greatly improve the recognition accuracy and improve the recognition efficiency of the system.

An important problem to be solved in comprehensive feature retrieval is the normalization of algorithm matching results. Because the similar distances obtained by different algorithms are not comparable to each other, that is, their expectations and variances may be far apart, so they must be normalized. This process can be completed by Formula (8).

00131_PSISDG12779_127792J_page_4_1.jpg

Where μk,σk refers to the mean and standard deviation of the sequence vk.

SVM has many unique advantages in solving small sample, nonlinear and high-dimensional pattern recognition, and can be extended to other machine learning problems such as function fitting. SVM is a two-class classifier, and its main idea is to find an optimal classification surface under the condition of linear separability, and the farther the two kinds of data to be classified are from the classification surface, the better. The flow chart of intelligent insect species identification based on computer vision is shown in Figure 1.

Figure 1.

Intelligent insect species identification process based on computer vision

00131_PSISDG12779_127792J_page_4_2.jpg

In the learning process, a certain number of insect images are selected as training samples, and the feature vectors of insects are extracted as the input vectors of SVM training, and the input vectors are learned to get the best classification model. In the process of testing, the feature vectors of test images are extracted and input into the trained classification model, and finally the classification categories of test samples are obtained.

Color and texture are regarded as different views, which are respectively learned in the subspaces of color and texture. After that, the two classifiers are used to classify unlabeled images, and those unlabeled images classified by the two classifiers are selected to be labeled. SVM learns the labeled samples in the whole view and gets a classification surface h. The unlabeled images are divided into positive feedback and negative feedback by h, and m positive feedback pictures are fed back to users for labeling.

The SVM is trained in the whole view to obtain the classifier h, and the unlabeled set D{Unmarked} is classified, and the top m images are labeled as 00131_PSISDG12779_127792J_page_4_3.jpg:

00131_PSISDG12779_127792J_page_5_1.jpg

When we encounter the problem of linear inseparability, we can consider mapping the problem to a higher dimensional space to make it linearly separable. However, mapping the features of low-dimensional space to high-dimensional space and calculating its inner product is a heavy task, even impossible 12. In order to solve this problem, only xi, x is the vector in the inner product, so the optimal classification surface g(x) can be expressed as:

00131_PSISDG12779_127792J_page_5_2.jpg

The auxiliary non-negative variable ai is called Langrange multiplier.

In order to solve it conveniently, the concept of kernel function is introduced. Let the form of kernel function be K(w,x), then the classifier is:

00131_PSISDG12779_127792J_page_5_3.jpg

The parameter a, y, b in the above formula has not changed, that is to say, in the process of solving, whenever the inner product is required, the kernel function can be used to calculate, so that a can be combined with the kernel function to get the classifier.

3.

RESULT ANALYSIS

In the early stage of the experiment, 20,000 insect images were selected for each purpose, and the features of these images were extracted to establish an insect data set. Because of the high similarity of the images of the same insect, and in order to prevent over-fitting phenomenon and enrich the image data, before extracting the features of the images, data promotion operation should be done first. According to the traditional image retrieval method. Assuming that the user specifies to retrieve n images, the images are evaluated, so that the images are divided into two categories: related image sets and irrelevant image sets, and the two sets are combined into a training sample set. SVM trains the training samples. According to the quadratic distance formula, the quadratic distance of all images in the image library is solved and sorted according to the distance.

Feature extraction is carried out on the image set after data enhancement, and feature labeling is carried out by using labelImg framework. The labeled data set is made into the required data set according to voc2007 format. Image feature representation: run length (48 dimensions), shape invariant moment (6 dimensions) and edge feature (108 dimensions). Firstly, the closest image is given by query, and then related images and irrelevant images are obtained by interaction. The related images are classified and recognized by SVM. This study is based on 64-bit Windows system, and the graphics card configuration is RTX2080TI.

The kernel function is selected according to the final recognition result, and the parameters of the kernel function are determined according to the 50% cross-validation and grid optimization method. The comparison of recognition rates under the condition of 64-bit Windows system and RTX2080TI graphics card configuration is shown in Figure 2.

Figure 2.

Recognition rate of insect species by different kernel functions

00131_PSISDG12779_127792J_page_6_1.jpg

It can be seen that the four kernel functions can achieve better classification results under the condition of selecting better parameters, and the radial basis kernel function has the highest classification accuracy and little difference in running time. Therefore, the kernel function of SVM classifier in this paper selects radial basis kernel function.

Using the constructed insect data set. The data set is randomly divided into training set and test set, and the number of selected test samples is about 30% of the total number of samples. The test samples are tested with different eigenvalues. The identification result of the test set is shown in Figure 3.

Figure 3.

SVM identification result

00131_PSISDG12779_127792J_page_6_2.jpg

It can be seen that the recognition rate of texture features for Drosophila is not high, and it is difficult to describe the differences of insects by individual features. The average recognition rate of insects by feature fusion is 94.747%, so the integration of three features can improve the classification accuracy; Combining local features with global features can further improve the recognition rate of insect species, but the recognition accuracy rate has not been significantly improved; At the same time, the dimension of features becomes larger, and the amount of calculation increases significantly.

The result of SVM classification is satisfactory. The implementation steps of SVM for pattern recognition are relatively simple, and it does not need a long training process. It only needs to solve the optimal hyperplane according to the initial samples, and then determine the decision function, and then it can be generalized to identify other samples to be recognized. In the process of classifier design, if the number of samples is very small, it is easy to over-learn with complex algorithms, which leads to the decline of classifier generalization ability.

4.

CONCLUSION

Traditional insect species identification is time-consuming and laborious, and its accuracy is not high, which seriously affects the development of insect control work in the later period. Computer vision technology is a fast and effective method to detect the number of insects. Using computer vision technology to identify insects in the actual environment is a very important and challenging job. In this paper, the global features of insects such as color, shape and texture and the local features of HOG are extracted, and SVM is used to construct a classifier for the specified species of insects, and the classification recognition rate of the classifier based on feature fusion is discussed. The experimental results show that the average recognition rate of insects by feature fusion is 94.747%. The experimental results show that the research results of this paper provide theoretical and practical basis for intelligent insect species recognition technology based on computer vision.

ACKNOWLEDGEMENTS

Project Name: Natural Science Research Project of Nanchang Institute of Technology (Fund number:NLZK-21-02)

REFERENCES

[1] 

Li, X. L., Zhou, P. B., Zhou, M. Q., et al., “Recognition of moth insects based on distinguishing binary local pattern features [J],” computer applications and software, 33 (3), 4 (2016). Google Scholar

[2] 

Sun, H. R., Belinda, L., Zhang, D, “Identification of two related species of Rhinophora based on morphological characteristics [J],” Acta Entomologica Sinica, 43 (2), 6 (2021). Google Scholar

[3] 

Sun, M. X., Yin, H. W., Wang, J. X., et al, “Research progress of insect pigments [J],” Acta Applied Entomology, 57 (2), 12 (2020). Google Scholar

[4] 

Qin, F., “Research on insect image recognition based on deep learning [J],” Information Technology, 46 (4), 6 (2022). Google Scholar

[5] 

Mai, T. T., Wei, L. Y., Yao, X. T., et al., “Image processing method of insect embryo based on optical coherence chromatography [J],” China Laser, 48 (9), 8 (2021). Google Scholar

[6] 

Wei, F. Y., Zhang, Z. Y., Liang, G. Z., “Application of insect species image recognition based on convolutional neural network [J],” Journal of Henan Normal University: Natural Science Edition, 50 (6), 10 (2022). Google Scholar

[7] 

Lin, D. K., Huang, S. G., Zhang, F. P., et al., “LEPIDOPTERA insect image recognition method based on improved differential evolution algorithm [J],” Forestry Science, 56 (3), 9 (2020). Google Scholar

[8] 

Lin, S. Y., Xiong, J. W., Zhong, W., et al., “Study on the Species Diversity of Orthoptera Insects in East Tianshan Mountains [J],” Resources and Environment in Arid Areas, 31 (1), 5 (2017). Google Scholar

[9] 

Zhu, L. Q., Zhang, D. X., Zhang, Z., “Image recognition of LEPIDOPTERA insects based on color names and OpponentSIFT features [J],” Acta Entomology, 58 (12), 7 (2015). Google Scholar

[10] 

Sun, X. D., Liao, Q. C., Han, X., et al., “On-line detection of foreign bodies in tea stems and insects based on electromagnetic vibration [J],” Spectroscopy and Spectral Analysis, 43 (1), 7 (2013). Google Scholar

[11] 

Xie, J. Y., Lu, Y. Y., Kong, W. X., et al., “Butterfly species identification in natural environment based on improved RetinaNet [J],” computer research and development, 058 (008), 1686 –1704 (2021). Google Scholar

[12] 

Zhang, Y. S., Zhao, Y. D., Yuan, M. C., “Insect identification and counting in stick insect image based on improved Faster-RCNN model [J],” Journal of China Agricultural University, 24 (5), 8 (2019). Google Scholar
© (2023) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Bin Huang "Research on intelligent insect species identification based on computer vision", Proc. SPIE 12779, Seventh International Conference on Mechatronics and Intelligent Robotics (ICMIR 2023), 127792J (11 September 2023); https://doi.org/10.1117/12.2689469
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Feature extraction

Computer vision technology

Image classification

Education and training

Image fusion

Image processing

Image retrieval

Back to Top