# A Lightweight Crop Pest Detection Method Based on Convolutional Neural Networks
## 4 Discussion  
Pests cause huge losses to agriculture across the world every year. Research on crop pest detection methods is one of the hottest study fields at present. In related studies, object detection methods based on convolutional neural networks are often used to detect crop pests. However, these methods cannot meet the requirements of high accuracy, fewer parameters and fewer computations for pest detection tasks in agricultural environments. Therefore, we propose a lightweight and high-accuracy crop pest detection method based on YOLOv3. We carried out the relevant experiments on the CP15 dataset, and the experimental results show that our method achieves the best accuracy with extremely few parameters and computations, being better across all metrics than the other methods evaluated in this study. Since the prior boxes are the foundation for subsequent research on pest detection methods, this study first compared the prior boxes generated by different clustering algorithms, and the results are shown in Table 3. The experimental results clearly show that the prior boxes generated by k-means++ have a better match with the dataset and a wider size distribution. This performance advantage is mainly due to the fact that the k-means++ method does away with the random selection of initial cluster centers used in the k-means methods. The random selection of initial clustering centers implies that the k-means method is sensitive to initialization, and inappropriate initialization can easily lead to the clustering process being trapped in a local optimum. [PERSON] et al. [39] and [PERSON] et al. [40] also highlighted this point in their studies. Moreover, it has been experimentally demonstrated in these studies that the performance of k-means clustering can be improved by using proper initialization methods. Thus, k-means++ improves the perfor \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **mAP (\%)** & **Params (M)** & **FLOPs (G)** \\ \hline YOLOv3 & 82.4 & 61.6 & 65.5 \\ YOLOv5m & 82.6 & 20.9 & 20.4 \\ CenterNet & 73.03 & 32.7 & 46.2 \\ Faster R-CNN & 73.16 & 137 & 253 \\ YOLOv3-tiny & 72.3 & 8.7 & 5.5 \\ Nanodet-plus-m-1.5x & 78.8 & 7.8 & 3 \\ YOLOv5s & 78.7 & 7.1 & 6.7 \\ YOLOLite-CSG & 82.9 & 5 & 9.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Performance comparison of the YOLOLite-CSG with existing major object detection methods for crop pest detection tasks. mance of clustering by using samples that are far from the existing clustering centers as the next clustering centers, producing better quality prior boxes in our experiments. For each improvement proposed in this study, we carried out an ablation experiment, and the results are shown in Table 4. Inspired by the work [41] of [PERSON] et al., this study simplified the original YOLOv3 by adjusting the number of residual blocks and the number of channels and built YOLOLite. The experiment results demonstrate that the number of parameters and the number of computations of YOLOLite are significantly reduced. This is mainly because the reduction in the number of residual blocks and channels greatly reduces the number of convolutional operations and the number of parameters for convolution. Meanwhile, the experiment results show that the k-means++ method effectively improves the detection accuracy, which is consistent with the description of the advantages of this method given above. In addition, the introduction of lightweight sandglass blocks further reduces the number of parameters and computations because the depthwise separable convolutions and group convolution decompose the convolution operations. This result is consistent with the work of [PERSON] et al. [42]. Moreover, the higher performance as a result of _hard-swish_ being used in the lightweight sandglass block leads to a significant improvement in detection accuracy as well. Finally, the introduction of coordinate attention substantially improves the detection accuracy with only a small increase in the number of parameters and computations.