Application of deep learning in the phytosanitary detection of cocoa using computer vision
DOI:
https://doi.org/10.51252/rcsi.v6i1.1385Keywords:
deep learning, automated diagnosis, classification models, plant health, artificial visionAbstract
This study analyzed the application of deep learning for automated phytosanitary detection in cacao using computer vision, comparing the performance of three architectures: ResNet50, EfficientNet-B0, and Vision Transformer (ViT-B/16). A reproducible pipeline was implemented, integrating image preprocessing, five-fold stratified cross-validation, and inferential statistical analysis using repeated-measures ANOVA. The dataset consisted of 4,390 RGB images of cacao fruits distributed across three imbalanced classes: Healthy, Black Pod Rot, and Pod Borer. All models were fully fine-tuned and trained using the AdamW optimizer, early stopping, and a dynamic learning rate scheduler. The results showed mean F1-macro values above 0.96 across all architectures, with no statistically significant differences among models (F = 0.278, p = 0.7645). Training curves exhibited stable convergence and low inter-fold variability, with no evidence of overfitting. These findings indicate that system performance primarily depends on the quality of the experimental pipeline and class imbalance handling rather than on the specific architecture employed.
Downloads
References
Anjali, Jena, A., Bamola, A., Mishra, S., Jain, I., Pathak, N., Sharma, N., Joshi, N., Pandey, R., Kaparwal, S., Yadav, V., Gupta, A. K., Jha, A. K., Bhatt, S., Kumar, V., Naik, B., Rustagi, S., Preet, M. S., & Akhtar, S. (2024). State-of-the-art non-destructive approaches for maturity index determination in fruits and vegetables: principles, applications, and future directions. Food Production, Processing and Nutrition, 6(1), 56. https://doi.org/10.1186/s43014-023-00205-5
Bono, A., Guaragnella, C., & D’Orazio, T. (2026). A perspective analysis of imaging-based monitoring systems in precision viticulture: Technologies, intelligent data analyses and research challenges. Artificial Intelligence in Agriculture, 16(1), 62–84. https://doi.org/10.1016/j.aiia.2025.08.001
Charry, A., Perea, C., Ramírez, K., Zambrano, G., Yovera, F., Santos, A., Jiménez, T., Romero, M., Lundy, M., Quintero, M., & Pulleman, M. (2025). The bittersweet economics of different cacao production systems in Colombia, Ecuador and Peru. Agricultural Systems, 224, 104235. https://doi.org/10.1016/j.agsy.2024.104235
Cilas, C., & Bastide, P. (2020). Challenges to Cocoa Production in the Face of Climate Change and the Spread of Pests and Diseases. Agronomy, 10(9), 1232. https://doi.org/10.3390/agronomy10091232
Deepa, R., Varun, P., Shoba, L. K., Swathy, R., & Prabhu, B. (2025). Advanced Image Processing Techniques for Precision Agriculture. In Innovations and Developments in Unmanned Aerial Vehicles (pp. 227–244). IGI Global Scientific Publishing. https://doi.org/10.4018/979-8-3693-8462-6.ch010
Delgado-Ospina, J., Molina-Hernández, J. B., Chaves-López, C., Romanazzi, G., & Paparella, A. (2021). The Role of Fungi in the Cocoa Production Chain and the Challenge of Climate Change. Journal of Fungi, 7(3), 202. https://doi.org/10.3390/jof7030202
He, K., Zhang, X., Ren, S., & Sun, J. (2015). Deep Residual Learning for Image Recognition. In Cornell University. https://doi.org/https://doi.org/1512.03385
Injante, R., Rios-Trigoso, G., Ramírez-Shupingahua, S., & Tejada Shupingahua, K. (2025). Procesamiento de imágenes para la detección de la madurez del fruto: una revisión sistemática. Revista Peruana de Ingeniería, Arquitectura y Medio Ambiente, 2(1). https://doi.org/10.37711/repiama.2025.2.1.3
Kingma, J., & Ba, D. P. (2014). Adam: A Method for Stochastic Optimization. Cornell University. https://doi.org/https://doi.org/10.48550/arXiv.1412.6980
Lebrini, Y., & Ayerdi Gotor, A. (2024). Crops Disease Detection, from Leaves to Field: What We Can Expect from Artificial Intelligence. Agronomy, 14(11), 2719. https://doi.org/10.3390/agronomy14112719
Magfirah, N., Sartiami, D., Niogret, J., & Ekayanti, A. (2025). Biological parameter of cocoa pod borer Conopomorpha cramerella (Lepidoptera: Gracillariidae) under laboratory conditions. IOP Conference Series: Earth and Environmental Science, 1494(1), 012020. https://doi.org/10.1088/1755-1315/1494/1/012020
Mall, P. K., Singh, P. K., Srivastav, S., Narayan, V., Paprzycki, M., Jaworska, T., & Ganzha, M. (2023). A comprehensive review of deep neural networks for medical image processing: Recent developments and future opportunities. Healthcare Analytics, 4, 100216. https://doi.org/10.1016/j.health.2023.100216
Miyittah, M. K., Kosivi, R. K., Tulashie, S. K., Addi, M. N., & Tawiah, J. Y. (2022). The need for alternative pest management methods to mitigate risks among cocoa farmers in the Volta region, Ghana. Heliyon, 8(12), e12591. https://doi.org/10.1016/j.heliyon.2022.e12591
Paparella, A., Schirone, M., & López, C. C. (2025). The Health Impact of Cocoa from Cultivation to the Formation of Biogenic Amines: An Updated Review. Foods, 14(2), 255. https://doi.org/10.3390/foods14020255
Polania Bello, V. (2023). Diagnosis of the agronomic and phytosanitary management practices of cocoa producers in San José del Fragua: the case of the Cerafín Garcia property. Environmental Research and Ecotoxicity, 2, 55. https://doi.org/10.56294/ere202355
Puig, A. S., Irish, B., Ayala-Silva, T., Wurzel, S., & Gutierrez, O. (2022). Effect of Cacao Black Pod Rot Screening Method on Disease Reaction Determination. The 1st International Online Conference on Agriculture—Advances in Agricultural Science and Technology, 71. https://doi.org/10.3390/IOCAG2022-12215
Quintero, I., Ceccaldi, A., Martínez, H., Santander, M., Rodríguez, J., & Escobar, S. (2025). Dry cacao pulp in chocolate bars: A sustainable, nutrient-rich sweetener with enhanced sensory quality through refractance windows drying. Applied Food Research, 5(1), 100700. https://doi.org/10.1016/j.afres.2025.100700
Raj, M., & Prahadeeswaran, M. (2025). Revolutionizing agriculture: a review of smart farming technologies for a sustainable future. Discover Applied Sciences, 7(9), 937. https://doi.org/10.1007/s42452-025-07561-6
Ray, R. K., Chakravarty, S., Dash, S., Ghosh, A., Mohanty, S. N., Reddy Chirra, V. R., Ayouni, S., & Khan, M. I. (2025). Precision pest management in agriculture using Inception V3 and EfficientNet B4: A deep learning approach for crop protection. Information Processing in Agriculture. https://doi.org/10.1016/j.inpa.2025.09.005
Schmidt, J. E., Puig, A. S., DuVal, A. E., & Pfeufer, E. E. (2023). Phyllosphere microbial diversity and specific taxa mediate within-cultivar resistance to Phytophthora palmivora in cacao. MSphere, 8(5). https://doi.org/10.1128/msphere.00013-23
Shafay, M., Hassan, T., Owais, M., Hussain, I., Khawaja, S. G., Seneviratne, L., & Werghi, N. (2025). Recent advances in plant disease detection: challenges and opportunities. Plant Methods, 21(1), 140. https://doi.org/10.1186/s13007-025-01450-0
Song, X., Yan, L., Liu, S., Gao, T., Han, L., Jiang, X., Jin, H., & Zhu, Y. (2025). Agricultural Image Processing: Challenges, Advances, and Future Trends. Applied Sciences, 15(16), 9206. https://doi.org/10.3390/app15169206
Taha, M. F., Mao, H., Zhang, Z., Elmasry, G., Awad, M. A., Abdalla, A., Mousa, S., Elwakeel, A. E., & Elsherbiny, O. (2025). Emerging Technologies for Precision Crop Management Towards Agriculture 5.0: A Comprehensive Overview. Agriculture, 15(6), 582. https://doi.org/10.3390/agriculture15060582
Tan, M., & Le, Q. V. (2020). EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Cornell University. https://doi.org/https://doi.org/10.48550/arXiv.1905.11946
Villalobos-Culqui, C., Valles-Coral, M. A., García-Rivas-Plata, C., & Tuesta-Hidalgo, O. A. (2025). Modelo de visión artificial basada en redes neuronales convolucionales para identificación de mazorca negra en plantaciones de cacao. Revista Científica de Sistemas e Informática, 5(1), e678. https://doi.org/10.51252/rcsi.v5i1.678
Vinci, G., Ruggeri, M., Gobbi, L., & Savastano, M. (2024). Social Life Cycle Assessment of Cocoa Production: Evidence from Ivory Coast and Ghana. Resources, 13(10), 141. https://doi.org/10.3390/resources13100141
Wang, Y., Deng, Y., Zheng, Y., Chattopadhyay, P., & Wang, L. (2025). Vision Transformers for Image Classification: A Comparative Survey. Technologies, 13(1), 32. https://doi.org/10.3390/technologies13010032
Waqas, M., Naseem, A., Humphries, U. W., Hlaing, P. T., Dechpichai, P., & Wangwongchai, A. (2025). Applications of machine learning and deep learning in agriculture: A comprehensive review. Green Technologies and Sustainability, 3(3), 100199. https://doi.org/10.1016/j.grets.2025.100199
Wu, K., Ji, Z., Wang, H., Shao, X., Li, H., Zhang, W., Kong, W., Xia, J., & Bao, X. (2025). A Comprehensive Review of AI Methods in Agri-Food Engineering: Applications, Challenges, and Future Directions. Electronics, 14(20), 3994. https://doi.org/10.3390/electronics14203994
Zahlul Ikhsan, Muhammad Al-Ikhlas, Yaherwandi, Hasmiandy Hamid, Aulia Oktavia, & Dandy Ahamefula Osibe. (2024). Level of Pest Infestation on Cocoa (Theobroma cacao L.) Variety BL-50 in Tanah Datar Regency, West Sumatera Province, Indonesia. Andalasian International Journal of Entomology, 2(1), 38–47. https://doi.org/10.25077/aijent.2.1.38-47.2024
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Jorge Raul Navarro-Cabrera, José Guillermo Beraún-Barrantes, Ángel Cárdenas-García, Carlos Mauricio Lozano-Carranza

This work is licensed under a Creative Commons Attribution 4.0 International License.
The authors retain their rights:
a. The authors retain their trademark and patent rights, as well as any process or procedure described in the article.
b. The authors retain the right to share, copy, distribute, execute and publicly communicate the article published in the Revista Científica de Sistemas e Informática (RCSI) (for example, place it in an institutional repository or publish it in a book), with an acknowledgment of its initial publication in the RCSI.
c. Authors retain the right to make a subsequent publication of their work, to use the article or any part of it (for example: a compilation of their works, notes for conferences, thesis, or for a book), provided that they indicate the source of publication (authors of the work, journal, volume, number and date).





