# Deep Learning-Based Image Recognition of Agricultural Pests
## 4 Experiment
### Experimental Results  
Figure 9 shows that the scores of [EMAIL_ADDRESS] and [EMAIL_ADDRESS]:0.95 in our model for the pest dataset were 0.84 and 0.65, respectively. We believe that, when the IOU threshold gradually increased, some pest types were difficult to assess because of the poor learning effect of their sample characteristics due to the small number of samples, leading to this result. It can be seen from Figure 10 that our model could accurately localize as well as classify most of the insects; however, the detection performance of the network was not so good when many bugs were stacked together or when the number of samples of certain classes of bugs was small. We also compared the experimental results of different models on pest datasets. As shown in Table 3, under the same experimental environment, our proposed method had advantages over other models, and its mAP_0.5 was 11.81% higher than that of the Cascade R-CNN model with ResNeXt-101 as the backbone network without any change. To investigate the impact of the proposed sliding window cropping method and the attention-based FPN, we conducted experiments on them separately. From Table 4, we can see that the sliding window cropping method could solve the problem of semantic information loss in large image input networks and improve the model's prediction accuracy. In addition, adding the attention module to the FPN layer could also enhance the model's performance. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Model** & **Backbone** & **Optimizer** & **Learning Rate** & **Momentum** & **Image-Size** & **Batch-Size** & **Epochs** \\ \hline Cascade Rcnn & R-50-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ Cascade Rcnn & R-101-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ Cascade Rcnn & X-101-32\(\times\)4d-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ YOLOX & YOLOX-5 & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ YOLOX & YOLOX-1 & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ YOLOX & YOLOX-x & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ Faster Rcnn & R-50-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ Faster Rcnn & R-101-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ Faster Rcnn & X-101-32\(\times\)4d-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ \hline Ours & X-101-32\(\times\)4d-FPN & SGD & 0.005 & 0.9 & 1280 \(\times\) 1280 & 64 & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Experimental parameter setting details. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Method** & **Backbone** & **Sliding Window** & \multicolumn{2}{c}{**Add Attention**} & \multicolumn{1}{c}{**mAP\_0.5**} & \multicolumn{1}{c}{**mAP\_0.50.95**} & \multicolumn{1}{c}{**Precision**} & \multicolumn{1}{c}{**F1-Score**} \\  & **Cutting** & **to the FPN** & & & & & \\ \hline Ours & X-101-32\(\times\)4d-FPN & \(\times\) & \(\times\) & 72.35 & 45.12 & 68.54 & 71.21 \\ Ours & X-101-32\(\times\)4d-FPN & \(\times\) & \(\surd\) & 75.64 & 47.17 & 69.03 & 76.36 \\ Ours & X-101-32\(\times\)4d-FPN & \(\surd\) & \(\times\) & 76.38 & 46.58 & 67.52 & 77.49 \\ Ours & X-101-32\(\times\)4d-FPN & \(\surd\) & \(\surd\) & 84.16 & 65.23 & 67.79 & 82.34 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Effect of the sliding window cropping method and attention-based FPN on the model. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Method** & **Backbone** & **mAP\_0.5** & **mAP\_0.50.95** & **Precision** & **F1-Score** \\ \hline Cascade Rcnn & R-101-FPN & 70.62 & 42.35 & 45.36 & 67.64 \\ Cascade Rcnn & X-101-32\(\times\)4d-FPN & 72.35 & 45.12 & 68.54 & 71.21 \\ YOLOX & YOLOX-s & 66.39 & 40.16 & 64.37 & 63.87 \\ YOLOX & YOLOX-l & 79.82 & 61.82 & 75.42 & 77.15 \\ Faster Rcnn & R-101-FPN & 65.45 & 49.67 & 51.56 & 63.24 \\ Faster Rcnn & X-101-32\(\times\)4d-FPN & 68.16 & 51.84 & 57.63 & 66.83 \\ \hline Ours & X-101-32\(\times\)4d-FPN & 84.16 & 65.23 & 67.79 & 82.34 \\ \hline \hline \end{tabular}
\end{table}