## 4 Experiment and Result Analysis
### Ablation Experiments  
To verify the improvements in the YOLOv8n algorithm proposed in this paper, five ablation experiments were conducted on the blueberry maturity dataset to assess the effectiveness of each modification. The results of the ablation experiments are compared to the YOLOv8n reference in Table 5.  
As shown in Table 4, in Experiment 1, replacing the C2f module in the backbone of the YOLOv8n network with C2-RFAConv enhanced the model's attention to local information when processing features. However, this comes at the cost of partially neglecting global features, leading to a decrease in recall. Despite this, the model's precision and mean average precision ([EMAIL_ADDRESS]) increased by 2.2% and 0.7%, respectively, with only a slight increase of 0.1 MB in model size. In Experiment 2, the introduction of Detect-FASFF adds additional convolutional layers and parameters, enabling the model to learn and compute adaptive weights for feature fusion. As a result, the model size increased by 2.6 MB. However, compared to Experiment Ref, the precision, recall, and [EMAIL_ADDRESS] improved by 1.7%, 4.2%, and 4%, respectively, significantly enhancing the model's detection performance. Experiment 3 incorporated Focaler-CIoU, further improving the model's precision, recall, and [EMAIL_ADDRESS], demonstrating that Focaler-CIoU enhances the model's fitting capability. In Experiment 4, fusing C2f-RFAConv and Detect-FASFF lead to an overall performance improvement compared to Experiments 1 and 2. In Experiment 5, the fusion of Detect-FASFF and Focaler-CIoU further improved the model's detection performance compared to Experiment 2. Finally, Experiment 6 evaluated the combined effect of all three proposed enhancements of the baseline network, resulting in the best-performing model. Compared to the baseline model, the improved model achieved increases of 2.8% in precision, 4% in recall,  
Figure 8: Comparative analysis of detection results for different detection heads. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**No.**} & **Base** & **C2f-** & **Detect-** & **Facial-** & **Precision/\%** & **Recall/\%** & **AP,\%** & **AP,\%** & **AP,\%** & **[EMAIL_ADDRESS]/\%** & **FFS** & **Model** \\  & **Model** & **RFAConv** & **FASFF** & **CIoU** & **Precision/\%** & **Recall/\%** & **\%** & **\%** & **\%** & **\%** & **[EMAIL_ADDRESS]/\%** & **FFS** & **Size/MB** \\ \hline Ref & YOLOv8n & \(\times\) & \(\times\) & \(\times\) & 86.3 & 75.2 & 86.2 & 86.4 & 79.5 & 84.0 & 161 & 6.0 \\
1 & YOLOv8n & \(\surd\) & \(\times\) & \(\times\) & 88.5 & 74.6 & 86.7 & 87.4 & 80.1 & 84.7 & 132 & 6.1 \\
2 & YOLOv8n & \(\times\) & \(\surd\) & \(\times\) & 88.0 & 79.4 & 89.0 & 90.4 & 84.8 & 88.0 & 99 & 8.6 \\
3 & YOLOv8n & \(\times\) & \(\times\) & \(\surd\) & 87.1 & 75.1 & 86.5 & 86.7 & 79.4 & 84.2 & 165 & 6.0 \\
4 & YOLOv8n & \(\surd\) & \(\surd\) & \(\times\) & 89.3 & 78.8 & 89.1 & 90.7 & 85.5 & 88.4 & 76 & 8.7 \\
5 & YOLOv8n & \(\times\) & \(\surd\) & \(\surd\) & 88.2 & 80 & 89.6 & 90.4 & 84.6 & 88.2 & 101 & 8.6 \\
6 & YOLOv8n & \(\surd\) & \(\surd\) & \(\surd\) & 89.1 & 79.2 & 89.1 & 91 & 85.5 & 88.5 & 80 & 8.7 \\ \hline \hline \end{tabular} \(\surd\) indicates using the component; \(\times\) indicates not using the component; r, s, and u represent ripe, semi-ripe, and unripe blueberries, respectively.  
\end{table} 
Table 5: Ablation experiments. and 4.5% in [EMAIL_ADDRESS], while the model size only grew by 2.7 MB. Additionally, the frame rate (FPS) reached 80 frames per second, fully meeting real-time detection requirements. Furthermore, as illustrated in Figure 9, the P-R curve of the final improved model is closer to the upper right corner of the coordinate axis and exhibits a larger area under the curve (AUC) compared to the baseline model. This indicates better overall performance across different thresholds. In addition, to further demonstrate the model's sensitivity to blueberry targets of different sizes, an image containing blueberry targets of various sizes was selected for testing.