# Study on Lightweight Model of Maize Seeding Object Detection Based on YOLOv7
## 3 Results and Analysis
### Comparison of Object-Detection Visualization Results  
In order to verify the effectiveness of the LW-YOLOv7 mode in the field environment, this study uses the model to perform real-time objection on maize seeding images captured by drones and selects other three existing popular object-detection models (Faster RCNN, YOLOv5, YOLOv7) that are compared with the LW-YOLOv7 model. Faster RCNN is a two-stage object detection model.YOLOv5, YOLOv7, and LW-YOLOv7 are all single-stage object detection models. The results are shown in Figure 13.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Index**} & \multirow{2}{*}{**GhostNet**} & \multirow{2}{*}{**CBAM**} & \multirow{2}{*}{**BiFPN**} & \multicolumn{2}{c}{**Total**} & \multirow{2}{*}{**mAP**} & \multirow{2}{*}{**FPS**} \\  & & & & & **Parameters** & **(M)** & **(\%)** & **(f/s)** \\ \hline YOLOv7 & - & - & - & - & 74.8 & 92.7 & 121 \\
1 & \(\surd\) & - & - & - & 58.8 & 91.5 & 94 \\
2 & \(\surd\) & \(\surd\) & - & - & 59.4 & 92.3 & 92 \\
3 & \(\surd\) & \(\surd\) & \(\surd\) & - & 59.4 & 92.9 & 92 \\
4 & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & 59.4 & 93.2 & 90 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Results of ablation experiments.  
Figure 12: The heat maps of GradCAM.  
Figure 13: Object-detection results of four models on two different sizes of objects. (**a**) Faster RCNN’s detection result on big objects; (**b**) YOLOv5I’s detection result on big objects; (**c**) YOLOv7’s detection result on big objects; (**d**) LW-YOLOv7’s detection result on big objects; (**e**) Faster RCNN’s detection result on small objects; (**f**) YOLOv5I’s detection result on small objects; (**g**) YOLOv7’s detection result on small objects; (**h**) LW-YOLOv7’s detection result on small objects. The red box is the correct prediction, the blue box is the duplicate prediction, the yellow box is the wrong prediction, and the purple box is the not detection.  
This experiment selected two kinds (shooting heights) of maize seedlings images at different heights. Where (a)-(d) shooting height is 1.6 m, (e)-(h) shooting height is 5 m.  
As shown in Figure 13a-d, using Faster RCNN for detection, there are positioning deviations, detection errors (mistakenly identifying weeds as seedling maize plants), and repeated detection. Using YOLOv5 for detection, although the problem of repeated detection is solved, a large number of weeds and negative samples still be identified as maize seedlings. Using YOLOv7 for prediction, the problem of positioning deviation is solved, but there are false detections. However, with LW-YOLOv7, we solved the problems of repeated detection and recognition errors.  
As shown in Figure 13e-h, Faster RCNN has a large number of missed detections. YOLOv5 and YOLOv7 also have some missed detections. However, LW-YOLOv7 performs better in small object detection than the other three models. It can be seen that when using LW-YOLOv7 on maize seedling images, it can effectively avoid the positioning deviation and run-time long of the Faster RCNN model. Additionally, it can solve the single-stage object detection model (YOLOv5 and YOLOv7) and repeated detection problem, and it reduces the probability of misidentification. The comparison of the four models proved the advantages of the LW-YOLOv7 model in real-time object detection tasks of maize seedling images, and it provides a solution basis for the rapid realization of the seedling maize plant detection in the field environment.