## 3 Results  
### C. oleifera Fruit Recognition Experiment  
In this study, a dataset of 1600 images was divided into a training set, a verification set, and a test set according to the proportion of 7:1.5:1.5, and the optimal weight model after iterative training was selected as the YOLOv7 algorithm real-time detection model for _C. oleifera_ fruit recognition. In addition, the confidence value of target detection was set to 0.7 to reduce the false detection rate of the algorithm, and the precision \(P\), recall \(R\), average precision \(mAP\), and comprehensive evaluation index \(F_{1}\) of the detection model were selected as the indicators for evaluating the performance of the model [30]. The calculation equation of \(F_{1}\) is as shown in Equation (5):  
\[F_{1}=\frac{2 PR}{P+R} \tag{5}\]  
The performance evaluation index data of the detection model obtained from the verification of the test set are shown in Table 1.  
To further verify the recognition effect of the detection model on _C. oleifera_ fruits in complex natural environments, the experiment carried out recognition testing for different illumination and occlusion conditions, which are the two main factors affecting the recognition effect [31]. In the experiment, 40 images of _C. oleifera_ fruits with different degrees of occlusion were selected and divided into no occlusion, slight occlusion and severe occlusion (the fruits occluded by other fruits or leaves exceed 50%), according to the degree of occlusion. In addition, 20 images of _C. oleifera_ fruits with large differences in illumination intensity caused by shooting at different angles were divided into strong light and back light, according to the illumination intensity. Furthermore, the above 60 images were selected from the training set and the verification set.  
The statistical results of the experiment are shown in Tables 2 and 3.  
According to the results in Table 2, the detection model can accurately recognize _C. oleifera_ fruits in the case of no occlusion and slight occlusion, with the recognition rate reaching 99.29% and 93.13%. In the case of severe occlusion, the recognition rate decreased to 75.21%, and most of the unrecognized fruits were occluded by more than 70%. The detection model can accurately recognize fruits within the uncovered range, as shown in Figure 4b.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline _P (\%)_ & _R (\%)_ & _mAP (\%)_ & _F1 (\%)_ & _t (s/pic)_ \\ \hline
97.3 & 97.6 & 97.7 & 97.4 & 0.021 \\ \hline \hline \end{tabular} Note: \(t\) is the average detection speed of the model.  
\end{table}
Table 1: Model performance evaluation metrics data.  
Figure 3: Binocular stereo vision ranging schematic diagram.  
Table 3 shows the detection results of the model under the different illumination conditions of sunlight and shading, reaching 90.64% and 91.34%, respectively, with the recognition effect of some images shown in Figure 5a,b.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**The Degree of** & **Number of Fruits** & **Number of Actual** & **Recognition Rate** \\
**Occlusion** & **Detected** & **Fruits** & **Recognition Rate** \\ \hline No occlusion & 141 & 142 & 99.29\% \\ Slight occlusion & 95 & 102 & 93.13\% \\ Severe occlusion & 88 & 117 & 75.21\% \\ \hline \hline \end{tabular}
\end{table}
Table 2: Recognition result statistics of _C. oleifera_ fruits under occlusion conditions.  
Figure 4: Recognition effect of _C. oleifera_ fruits with different occlusion: (**a**) slight occlusion; (**b**) severe occlusion.  
Figure 5: Recognition effect of _C. oleifera_ fruits with different occlusion: (**a**) front light; (**b**) back light.