# Detection of Miss-Seeding of Sweet Corn in a Plug Tay Using a Residual Attention Network
## 1 Introduction  
Sweet corn has great market potential and huge development prospects in China due to its high nutritional value and good taste; thus, its planting area is expanding yearly. The seedling transplanting method is widely adopted in the planting industry because it has many advantages, such as saving seeds, increasing the survival rate of seedlings, and improving the efficiency of transplantation. [PERSON] [1] stated that miss-seeding occurs in the presence of cavities at rates ranging from 5% to 20% after the seeding operation because sweet corn seeds are dry and different in shape and size. It seriously affects the planting efficiency of sweet corn and the utilization rate of a plug tray. Manual reseeding has high costs and low efficiency, and therefore, it is vital to consider mechanized reseeding. The first step of mechanized reseeding is to realize the automatic detection of missed seeding. However, machine vision is the key technology to realize automatic miss-seeding detection.  
With the rapid development of artificial intelligence, machine vision occupies an important position in image recognition [2]. [PERSON] [3] used machine vision to extract features such as seed morphology and color from seed images to identify and classify plant species. [PERSON] [4] and [PERSON] [5] used machine vision to extract theseed contour feature to realize the recognition and classification of corn seeds. [PERSON] [6] realized the classification of different corn [7] varieties (white, yellow, and purple) using hyperspectral imaging (HSI) and the PLS-DA classification model. [PERSON] [8] used hyperspectral imaging combined with multi-linear discriminant analysis (MLDA) to realize the recognition and classification of corn seeds. [PERSON] [9] used the HSI classification and the support vector machine (SVM) model to classify viable corn seeds. [PERSON] [10] realized the classification of haploid and diploid corn seeds by combining hyperspectral imaging technology with the VGG-19 network. Most of these studies on corn seeds were carried out in a single concept and an undisturbed environment and focused on corn seeds with a regular shape. Sweet corn seeds have different shapes and sizes. The method combining machine vision and seed contour extraction is not suitable for the recognition of sweet corn seeds. The high cost of hyperspectral imaging increases the cost of planting sweet corn, and therefore, the methods combined with hyperspectral imaging are not applicable for corn seed identification.  
The convolutional neural network (CNN) can automatically learn the features of the input image. The network can solve the overfitting problem by weight sharing and local connection, and thus, it has achieved excellent results in various image recognition tasks [11]. [PERSON] [12] used deep neural networks (DNN) to achieve the target classification and high accuracy of target detection in experiments. [PERSON] [13] completed the classification of corn seed varieties by combining the convolutional neural network (CNN) and artificial neural network (ANN). [PERSON] [14] used the VGG network to complete the recognition task of corn and rice. With the deepening of network layers, the network is prone to problems such as gradient dispersion and network degradation. Compared with other network models, the ResNet model with the recognition task can deal with overfitting and has a greater ability for the recognition and classification of seed varieties [15]. Therefore, this paper proposes a detection method for miss-seeding based on the ResNet network. The sample of the original color image was segmented into a captured image of the single plug tray. It could not only avoid the problem of misidentifying the seeds in the seedling plug tray due to bright light but also improve the recognition accuracy by narrowing the recognition range. To fully use the color difference between the sweet corn seeds and the plug tray, we introduced the CBAM module to the residual module, which improved the recognition accuracy of the network.