## 4 Conclusions  
The objective of this study was to evaluate the performance of the YOLOv8 and Detectron2 frameworks in segmenting RGB and depth images, comparing their segmentation efficacy and processing times in 3D image contexts to find an optimal solution for instance segmentation in the 3D space.  
The analysis revealed that depth map-based segmentation models significantly outperformed RGB-based models in terms of both Intersection over Union (IoU) and Matthew's correlation coefficient (MCC). Depth-based models consistently achieved IoU and MCC scores above 92%, while RGB-based models scored below 82%. For example, the YOLOv8s model achieved the highest IoU (0.952 \(\pm\) 0.014) and MCC (0.963 \(\pm\) 0.011) among the depth-based models, demonstrating superior segmentation accuracy. In contrast, the best-performing RGB model, YOLOv8l, managed an IoU of 0.810 \(\pm\) 0.073 and an MCC of 0.779 \(\pm\) 0.068. Comparing the two frameworks, both YOLOv8 and Detectron2 showed no significant differences in IoU and MCCs within their respective spatial domains (2D and 3D). However, the YOLOv8 models were significantly faster in their processing times. YOLOv8n achieved a processing time of 18.10 \(\pm\) 3.68 ms, whereas the lightweight Detectron2 model, R50-FPN, was significantly slower (57.67 \(\pm\) 7.35 ms). This difference in processing speed highlights YOLOv8's advantage in real-time applications. In the qualitative analysis of model performance, segmentation masks generated by the YOLOv8 and Detectron2 models were compared to ground truth masks through true positive (TP), true negative (TN), false positive (FP), and false negative (FN) values. Both the YOLOv8-seg and Detectron2 models exhibited under-segmentation, where Detectron2's output had jagged boundaries, indicating struggles with edge precision, whereas the YOLO models showed smoother, more accurate delineation of objects.  
Future research should explore the application of segmentation models for improved volume estimation of 3D images. Integrating segmentation with advanced volume estimation techniques could enhance precision agriculture, enabling more accurate and efficient monitoring of harvesting volume and transportation optimization. Further studies should also investigate the performance of these models in different agricultural contexts and under varied environmental conditions, providing a more comprehensive evaluation of their capabilities and limitations.  
C.C.M.: Conceptualization; Data curation; Formal analysis; Investigation; Methodology; Software; Writing--original draft. T.J.E.: Funding acquisition; Project administration; Supervision; Writing--original draft. Q.U.Z.: Supervision; Writing--review and editing. A.A.A.-M.: Writing--review and editing. A.A.F.: Writing--review and editing. All authors have read and agreed to the published version of the manuscript.  
This research was funded by the Natural Sciences and Engineering Research Council (NSERC) of Canada Discovery Grants Program (RGPIN-06295-2019). Data Availability Statement: Data will be made available upon request.  
The authors would like to thank the Bragg Lumber Company for the use of commercially managed wild blueberry fields. The authors would also like to acknowledge the efforts of Dalhousie's Agricultural Mechanized Systems research team for assistance in data collection.  
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.