Ensemble Deep Learning for Automated Opuntia Species Identification and Structural Quantification
Abstract
Species identification and structural quantification in the genus Opuntia (prickly pear cactus) remain largely manual despite the crop's growing economic and ecological importance in arid and semi-arid agriculture. Manual assessment is labor-intensive and error-prone because Opuntia exhibits high morphological variability, overlapping plant structures, and visually similar species. We present a unified computer vision framework that simultaneously performs species identification, cladode detection, and fruit detection using deep learning and confidence-weighted ensemble learning. A dataset of 429 field images representing seven Opuntia species was systematically annotated in Roboflow for all three tasks. We compared YOLOv5, YOLOv8, and Roboflow Object Detection Model v3, and combined the two strongest models through confidence-weighted prediction fusion. YOLOv8 substantially outperformed YOLOv5 (81.3% vs. 31.3% mAP50), while Roboflow v3 achieved the best individual performance (85.3% mAP50). The ensemble increased recall to 97.5%, recovering detections missed by individual models while trading off precision (67.5%), resulting in an F1-score of 79.7%. The primary source of error remained confusion between the visually similar species O. amyclaea and O. ficus-indica (~16%), highlighting the challenge of fine-grained plant classification using RGB imagery alone. By integrating species recognition and structural quantification within a single framework, this work demonstrates how ensemble learning can improve detection robustness for morphologically complex agricultural crops and provides a practical foundation for automated crop monitoring and phenotyping.