Avocado Ripeness Classification Based on Digital Imagery Using an Artificial Neural Network

Authors

  • Sriyanto Institut Informatika dan Bisnis Darmajaya
  • Febri Pratama Institute of Informatics and Business Darmajaya
  • Zuriati Politeknik Negeri Lampung

DOI:

https://doi.org/10.32664/smatika.v16i02.2390

Keywords:

Artificial Neural Network, Avocado, Digital Image, Multi-Class Classification, Ripeness Classification

Abstract

Traditional methods for determining avocado ripeness rely primarily on subjective visual observation, which is highly prone to error. This study aims to develop an automated classification system for avocado ripeness using a sequential Artificial Neural Network (ANN) based on digital image data. The dataset consisted of 1,500 balanced avocado images distributed across three classes: Ripe (500 images), Rotten (500 images), and Unripe (500 images). A total of 1,200 images were used for training and 300 images for validation. Images were preprocessed through resizing to 128 × 128 pixels and pixel intensity normalization. The proposed ANN architecture consisted of a Flatten layer, two hidden Dense layers with ReLU activation, and an output layer with Softmax activation. Experimental results showed that the model achieved an overall accuracy of 89.00%, with macro-average Precision, Recall, and F1-Score values of 0.92, 0.89, and 0.89, respectively. The best classification performance was achieved for the Rotten class, with a Precision of 1.00 and a Recall of 0.96. Classification errors mainly occurred between the Unripe and Ripe classes, where visual similarities during the ripening transition stage led to cross-class predictions. Overall, the proposed ANN model demonstrated reliable performance for avocado ripeness classification using digital image data and showed its potential as a simple image-based decision-support tool for post-harvest quality assessment.

References

[1] M. Rizzo, M. Marcuzzo, A. Zangari, A. Gasparetto, and A. Albarelli, “Fruit Ripeness Classification: A Survey,” Artif. Intell. Agric., vol. 7, pp. 44–57, 2023, doi: 10.1016/j.aiia.2023.02.004.

[2] M. Ulfa and T. F. Abidin, “Ripeness Detection and Shelf Life Prediction of Avocados Using YOLOv8 and Hybrid Machine Learning,” J. Inf. Syst. Eng. Bus. Intell., vol. 12, no. 1, pp. 31–42, 2026, doi: 10.20473/jisebi.12.1.31-42.

[3] J. Piero, M. Burga, and W. A. Cabrera, “Development of a Method for the Prediction of Optimal Maturity of Avocado Using Machine Learning,” Preprints, 2024, doi: 10.20944/preprints202407.1314.v1.

[4] A. Hamzah, E. Susanti, and R. M. Lestari, “Klasifikasi Kematangan Buah Alpukat Mentega Berdasarkan Fitur Warna Menggunakan Support Vector Machine (SVM),” J. Innov. Futur. Technol., vol. 6, no. 1, pp. 108–120, 2024, doi: 10.47080/iftech.v6i1.3103.

[5] P. S. Muthukumarana and A. C. Aponso, “A Review on Deep Learning Based Image Classification of Plant Diseases,” Int. J. Comput. Theory Eng., vol. 12, no. 5, pp. 118–122, 2020, doi: 10.7763/IJCTE.2020.V12.1275.

[6] J. Saputra, V. Y. P. Ardhana, and M. Afriansyah, “Klasifikasi Kematangan Buah Alpukat Mentega Menggunakan Metode K-Nearest Neighbor Berdasarkan Warna Kulit Buah,” RESOLUSI Rekayasa Tek. Inform. dan Inf., vol. 3, no. 5, pp. 214–221, 2023, doi: 10.30865/resolusi.v3i5.763.

[7] C. A. Jaramillo-Acevedo, W. E. Choque-Valderrama, G. E. Guerrero-Álvarez, and C. A. Meneses-Escobar, “Hass Avocado Ripeness Classification by Mobile Devices Using Digital Image Processing and ANN Methods,” Int. J. Food Eng., vol. 16, no. 12, 2020, doi: 10.1515/ijfe-2019-0161.

[8] Ş. Çelik, “Modeling Avocado Production in Mexico with Artificial Neural Networks,” Eng. Technol. J., vol. 7, no. 10, pp. 1605–1609, 2022, doi: 10.47191/etj/v7i10.08.

[9] F. Aprilliani, D. Atmiasih, and A. Ristiono, “The Evaluation of Avocado (Persea americana Mill.) Maturity Level Using Image Processing Technology,” J. Penelit. Pascapanen Pertan., vol. 18, no. 1, pp. 1–8, 2021, doi: 10.21082/jpasca.v18n1.2021.1-8.

[10] Y. A. Pratama, “Membangun Sistem Identifikasi Kematangan Buah Alpukat Menggunakan Teknologi Pengolahan Citra Digital,” Kalijaga J. Penelit. Multidiplin Mhs., vol. 1, no. 3, pp. 102–109, 2024, doi: 10.62523/kalijaga.v1i3.18.

[11] N. Aulia, Iqbal, and H. Asrawi, “Analisis Prediktif Tingkat Kematangan Alpukat Menggunakan Algoritma Logistic Regression,” J. Ilmu Komput. Aceh, vol. 3, no. 1, pp. 152–163, 2026, doi: 10.51179/ilka.v3i1.46.

[12] A. P. Pratama, Jumadi, and E. Nurlatifah, “Klasifikasi Ras Kucing Dengan Pendekatan Convolutional Neural Networks Menggunakan Arsitektur Inception V4,” SMATIKA, vol. 15, no. 2, pp. 248–257, 2025, doi: 10.32664/smatika.v15i02.1547.

[13] A. T. Adiana, Jumadi, and E. Nurlatifah, “Klasifikasi Penyakit Pada Daun Padi Menggunakan Model Hybrid,” SMATIKA STIKI Inform. J., vol. 15, no. 2, pp. 258–267, 2025, doi: 10.32664/smatika.v15i02.1548.

[14] A. Kamilaris and F. X. Prenafeta-Boldú, “Deep Learning in Agriculture: A Survey,” Comput. Electron. Agric., vol. 147, pp. 1–53, 2018, doi: 10.1016/j.compag.2018.02.016.

[15] T. Ramirez-Guerrero, M. I. Hernandez-Perez, M. S. Tabares, A. Marulanda-Tobon, E. Villanueva, and A. Peña, “Agroclimatic and Phytosanitary Events and Emerging Technologies for Their Identification in Avocado Crops: A Systematic Literature Review,” Agronomy, vol. 13, pp. 1–27, 2023, doi: 10.3390/agronomy13081976.

[16] C. A. Garillos-Manliguez and Y. J. Chiang, “Multimodal Deep Learning and Visible-Light and Hyperspectral Imaging for Fruit Maturity Estimation,” Sensors, vol. 21, pp. 1–17, 2021, doi: 10.3390/s21041288.

[17] M. H. Hanafi, N. Fadillah, and A. Ihsan, “Optimasi Algoritma K-Nearest Neighbor untuk Klasifikasi Tingkat Kematangan Buah Alpukat Berdasarkan Warna,” IT J. Res. Dev., vol. 4, no. 1, pp. 10–18, 2019, doi: 10.25299/itjrd.2019.

[18] Y. J. Davur, W. Kämper, K. Khoshelham, S. J. Trueman, and S. H. Bai, “Estimating the Ripeness of Hass Avocado Fruit Using Deep Learning with Hyperspectral Imaging,” Horticulturae, vol. 9, pp. 1–16, 2023, doi: 10.3390/horticulturae9050599.

[19] M. Ahmed, H. Mustafa, M. Wu, and M. Babaei, “Few Shot Learning for Avocado Maturity Determination from Microwave Images,” J. Agric. Food Res., vol. 15, p. 100977, 2024, doi: 10.1016/j.jafr.2024.100977.

[20] M. Salameh, D. Nacouzi, G. Lahoud, I. Riachy, and W. El Kayal, “Evaluation of Postharvest Maturity Indices of Commercial Avocado Varieties Grown at Various Elevations Along Lebanon’s Coast,” Front. Plant Sci., vol. 13, 2022, doi: 10.3389/fpls.2022.895964.

[21] P. Xavier, P. M. Rodrigues, and C. L. M. Silva, “Shelf-Life Management and Ripening Assessment of Hass Avocado (Persea americana) Using Deep Learning Approaches,” Foods, vol. 13, pp. 1–22, 2024, doi: 10.3390/foods13081150.

[22] D. D. Arfika, I. Syafitri, and P. H. Pahutar, “Sistem Pendeteksi Kematangan Buah Alpukat Dengan Transformasi Ruang Warna HSI,” J. Mhs. Tek. Inform., vol. 8, no. 4, pp. 6061–6066, 2024, doi: 10.36040/jati.v8i4.10117.

Downloads

Published

2026-06-28