# SPL-YOLOv8: A Lightweight Method for Rape Flower Cluster Detection and Counting Based on YOLOv8n
## 4 Results and Analysis
### Counting Results and Robustness Analysis  
To visually evaluate the performance of SPL-YOLOv8 and other detection models in the rapeseed flower detection task, we selected a typical rapeseed flower image from the test set, applied various models for detection, and visualized the results while counting the flowers. The results are shown in Figure 11.  
All models demonstrate good detection performance and counting accuracy on RFRB. However, differences exist in detection details. Models like CenterNet, RetinaNet, SSD, YOLOv3, and YOLOv4 produce more redundant bounding boxes due to the lack of effective attention modules in feature extraction and insufficient model constraints, affecting detection precision. In contrast, YOLOv5 and YOLOv10 series, with added attention mechanisms and new loss functions, reduce redundant boxes and improve accuracy and efficiency. YOLOv11 and RT-DETR series stand out with high detection accuracy and an average absolute error (MAE) below 8 in counting tasks. However, YOLOv11n has twice as many parameters as SPL-YOLOv8 and three times as many as its pruned version and the GFLOPs value of the RT-DETR series exceeds 10 times that of SPL-YOLOv8, indicating that the model lightweight effect is poor and may require high computational resources. To further assess our model's counting performance, we compared it with density-regression-based counting models MCNN, CSRNet, and TasselNet. Results and visualizations are shown in Figure 12. MCNN [50] and CSRNet [51] excel in crowd counting but perform poorly on RFRB due to flower occlusion and background interference. TasselNet [52; 53], designed for counting crops like wheat and rice, shows good performance but only provides density maps without precise location information. Our detection - based counting model offers both high-precision counting and geometric location information, enhancing practicality and flexibility, especially for applications requiring precise flower localization and analysis. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Models** & **AP\({}_{50}\)/\%** & **Parameters/M** & **GFLOPs/G** & **Model Size/MB** & **Weighted Score** \\ \hline Centernet & 90.3 & 31.15 & 109.7 & 124.9 & 0.71 \\ Retinanet & 80.4 & 34.65 & 163.5 & 138.9 & 0.59 \\ EfficientDet-D0 & 85.6 & 3.94 & 2.8 & 17.9 & 0.66 \\ SSD & 89.6 & 22.52 & 273.2 & 90.6 & 0.64 \\ MobileNet-SSD & 78.2 & 17.54 & 44.3 & 43.4 & 0.55 \\ YOLOv3 & 84.2 & 58.67 & 155.3 & 235.1 & 0.53 \\ YOLOv4 & 72.2 & 60.08 & 141.0 & 244.1 & 0.43 \\ YOLOv5n & 92.2 & 1.68 & 4.1 & 3.9 & 0.75 \\ YOLOv5s & 92.1 & 6.68 & 15.8 & 14.4 & 0.71 \\ YOLOv6 & 90.2 & 4.02 & 9.5 & 16.6 & 0.68 \\ YOLOv7 & 91.0 & 5.85 & 10.1 & 18.5 & 0.69 \\ YOLOv8n & 92.2 & 2.86 & 8.1 & 6.5 & 0.74 \\ YOLOv10n & 92.4 & 2.16 & 6.5 & 5.8 & 0.75 \\ YOLOv11n & 92.7 & 2.46 & 6.3 & 5.5 & 0.76 \\ RT-DETR-r18 & 92.7 & 18.95 & 56.9 & 40.5 & 0.73 \\ RT-DETR-r34 & **92.9** & 29.67 & 88.8 & 63.0 & 0.73 \\
**SPL-YOLOv8 (ours)** & 92.1 & 1.24 & 3.4 & 2.8 & 0.75 \\
**SPL-YOLOv8-prune (ours)** & 92.2 & **0.13** & **1.1** & **0.5** & **0.77** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of our approach with mainstream models. The coefficient of determination (\(R^{2}\)) is used to reflect the goodness of fit of a linear regression model. By utilizing the predicted number of rapeseed flower clusters output by the network model and the corresponding manually calculated true counts, we explore the correlation between them. In Figure 13a-c, we present the fitting results for the YOLOv8n, SPL-YOLOv8, and SPL-YOLOv8-prune networks, respectively. All three models exhibit  
Figure 11: Comparison of Detection results for different models. Figure 12: Visualization of counts for different models. strong correlations between manual counting (MC) and inferred counting (IC) on the RFRB dataset, with \(R^{2}\) values of 0.9247, 0.9414, and 0.9460, respectively, indicating that most predictions are sufficiently accurate. Compared to YOLOv8n, the fitting curves of SPL-YOLOv8 and SPL-YOLOv8-prune are closer to the 1:1 line.