YOLOV8-POWERED COMPUTER VISION FOR COFFEE CHERRY RIPENESS, DEFECT, AND MORPHOLOGICAL ASSESSMENTMEXICO’S POTENTIAL
DOI:
https://doi.org/10.47163/agrociencia.v60i3.3485Palabras clave:
ViT-CNN feature extraction, smart sorting systems, Sustainable agriculture, computer vision, deep learningResumen
The present investigation describes an advanced multi-task deep learning framework for automated inspection of coffee cherry quality using YOLOv8 with color-based segmentation and Vision Transformer-Convolutional Neural Network (ViT-CNN) feature extraction. The model performs ripeness stage classification, defect detection, and size and shape analysis. For ripeness detection, YOLOv8 was enhanced with a color segmentation module, achieving class-wise accuracies of 90–95 % for unripe, partially ripe, and fully ripe cherries, with moderate performance (85 %) for overripe samples. ViT-CNN feature maps improved segmentation clarity and bounding-box localization, particularly in high-density clusters. Defect detection was carried out across five categories (healthy, blackened, moldy, wrinkled, and insect-damaged), achieving F1-score values between 0.88 and 0.96 and mean average precision at 50 % intersection over union (mAP@50) values above 0.97 for key defect classes after 150 training epochs. Quantitative evaluation of morphological characteristics for size and shape assessment further demonstrated model robustness, with insect-damaged cherries reaching a contour accuracy of 0.98 and an Intersection over Union (IoU) of 0.96. Comparative analysis with YOLOv5 and Faster Region-Based Convolutional Neural Network (Faster R-CNN) showed superior performance of the proposed architecture across all metrics, including precision, recall, F1-score, and mAP. By incorporating contextual embeddings and attention mechanisms, the framework enables accurate, real-time sorting for smart agricultural systems.
Archivos adicionales
Publicado
Número
Sección
Licencia
Agrociencia es una publicación sesquimensual en formato totalmente en inglés, y editada por el Colegio de Postgraduados. Carretera México-Texcoco Km. 36.5, Montecillo, Texcoco, Estado de México, CP 56264, Teléfono (52) 5959284427. www.colpos.mx. Editor en Jefe de Agrociencia: Dr. Fernando Carlos Gómez Merino. Reservas de Derechos al Uso Exclusivo: 04-2021-031913431800-203, e-ISSN: 2521-9766, otorgados por el Instituto Nacional del Derecho de Autor.








