# Research on Identification Technology of Field Pests with Protective Color Characteristics
## 2 Materials and Methods
### Pest Image Data Set  
Using the _Pieris rapae_ and cabbage spectral information obtained by hyperspectral technology, specific spectral characteristics of _Pieris rapae_ and cabbage can be formed on the spectral curves, and comparing these two curves to get the wavelength with the largest reflectivity difference [33; 34]. According to this wavelength, the appropriate camera, light source, filter, and other key components are selected to build the image acquisition system. As exhibited in Figure 3, the system mainly consists of the color camera of The Imaging Source with model DFK 41 BU02, industrial lens of Computar with a focal length of 8.5 mm, 850 nm infrared filter, and 850 nm ring light source.  
With the image acquisition system, pest images were collected in the cabbage plantation of Yunyuan, Hunan Agricultural University. With the purpose of improving the robustness of the identification algorithm, the original data set covers _Pieris rapae_ under different camera angles, different postures, and other conditions, as well as images with occlusion and overlap, such as _Pieris rapae_ in curled state and _Pieris rapae_ in an extended state (Figure 4a,b), a _Pieris rapae_ and multiple _Pieris rapae_ (Figure 4c,d), unobstructed _Pieris rapae_ and covered _Pieris rapae_ (Figure 4e,f), and _Pieris rapae_ on the left side of the image and _Pieris rapae_ in the middle of the image (Figure 4g,h). After image acquisition, 500 pest images with high image quality are obtained by manually screening pest images to eliminate the blurred images and distorted images.  
The original image data set was expanded through data enhancement to enhance the diversity of the data set, avoid overfitting, and boost the generalization ability and robustness of the identification algorithm [35; 36; 37]. Common data enhancement methods include rotation, flip, clipping, adding noise, jitter, blur, translation, and staggered transformation [38; 39; 40]. In this paper, the original image data set was expanded from 500 images to 1500 images through rotation, flip, translation, and changing brightness considering the factors such as the influence of camera angle and light intensity (including the lighting conditions simulating sunny or cloudy days and exposure or insufficient light) on the identification algorithm (Figure 5).  
Figure 3: Schematic diagram of the relative position of camera, filter, and ring light source. (**a**) The imaging source, (**b**) the industrial lens, (**c**) 850 nm infrared filter, and (**d**) 850 nm ring light source.  
The pest images were labeled one by one by labeling software. The images of _Pieris rapape_ were labeled with a rectangular box and then named. The annotation information was saved in the format of the Pascal (Pattern Analysis, Statical Modeling and Computational Learning) VOC (Visual Object Classes) dataset, which contained the coordinates, labels, and serial numbers of each box. Pest images, labeled files, and other files are built into the dataset following the directory structure of the Pascal VOC dataset. Then, the pest images and annotation files are divided into training set, verification set and test set according to the proportion of 6:2:2, respectively. The training set was employed to fit the detection network. The validation set was adopted to adjust the super parameters of the detection network and preliminarily evaluate the network performance. The test set is used to evaluate the generalization ability of the final model.