A Classical Machine Learning Algorithms Approach for Identifying Banana Ripening State Using RGB Color Features in Images
DOI:
https://doi.org/10.14482/inde.44.01.444.327Keywords:
sensory analysis, machine learning, cavendish, color science, Von Loesecke ripening scale, Musa sp. L, computer visionAbstract
Due to its nutritional value, sensory characteristics, and year-round availability, bananas are one of the most consumed fruits worldwide, with high demand across different populations. During its ripening period, bananas undergo changes in organoleptic characteristics such as color, flavor, aroma, and nutritional composition. Harvest timing is key to proper preservation and marketing, but it is often determined using subjective criteria by the farmer. Traditional methods based on visual observation or the use of specialized equipment are costly, imprecise, or invasive. This paper proposes the use of computational tools based on machine learning algorithms to classify the ripeness state of bananas during the harvesting process, using digital images of the fruit. Six classic machine learning algorithms were evaluated to classify ripeness state using RGB color characteristics of the aforementioned images. The best accuracies (accuracy 0.82) were obtained for the k-nearest neighbors, support vector machines, and random forests algorithms. The results open up a future agenda that includes, in addition to spectral features, other variables such as size, shape, and texture.
References
M. Burgos-Hernández, “El plátano: la historia detrás de la fruta… y otros secretos, Desde el Herbario CICY, vol. 10, pp. 203-208, Sep. 2018. [Online]. Disponible: https://www.cicy.mx/Documentos/CICY/Desde_Herbario/2018/2018-09-13-MBurgos-El-platano.pdf
K.H. Maseko, T. Regnier, B. Meiring, O.C. Wokadala, and T.A. Anyasi, “Musa species variation, production, and the application of its processed flour: A review”, Scientia Horticulturae, vol. 325, Feb. 2024, Art no. 112688.
G.E. Martínez-Solórzano, y J.C. Rey-Brina, “Bananos (Musa AAA): Importancia, producción y comercio en tiempos de Covid-19”, Agronomía Mesoamericana, vol. 32, no. 3, pp. 1034-1046, Sep.-Dic. 2021, doi: 10.15517/am.v32i3.43610
S. Leonel, M. Leonel, P.R.R.de Jesus, M.A. Tecchio, M.d.S. Silva, H.T. Cândido, N.Z. Molha, L.F. de Ouros, “Achievements of Banana (Musa sp.)-Based Intercropping Systems in Improving Crop”, Sustainability. Horticulturae, vol. 10, no. 9, 2024, Art no. 956, doi:10.3390/horticulturae10090956
E.I. Quevedo C., E.C. Prado C., C.A. Valarezo M., y J. P. Renteria M., “Análisis de los Beneficios Económicos y Ambientales: Producción de Banano Orgánico”, Ciencia Latina Revista Científica Multidisciplinar, vol. 8, no. 1, pp. 6699-6709, Ene.-Feb. 2024, doi: 10.37811/cl_rcm.v8i1.10031
A.D. Debebe, and D. Dagne, “Analysis of Socio-Economic Factors Affecting Banana Production: Evidences from Lowlands of Uba Debretsehay Woreda, Gamo Gofa Zone, SNNPRS”, Journal of Economics and Sustainable Development, vol. 9, no. 9, 2018. [Online]. Available: https://core.ac.uk/download/pdf/234648282.pdf
M.E. Martínez-González, R. Balois-Morales, I. Alia-Tejacal, M.A. Cortes-Cruz, Y.A. Palomino-Hermosillo, y G.G. López-Gúzman, “Poscosecha de frutos: maduración y cambios bioquímicos”, Revista mexicana de ciencias agrícolas, vol. 8, no. spe19, pp. 4075-4087. Nov.-Dic. 2017, doi: 10.29312/remexca.v0i19.674
P.S. Kumar, T. Shuprajhaa, P. Subramaniyan, A. Mohanasundaram, K.N. Shiva, M. Mayilvaganan, and U. Subbaraya, “Ripening dependent changes in skin color, physicochemical attributes, in-vitro glycemic response and volatile profiling of banana varieties”, Food Bioscience, vol. 56, Dec. 2023, Art 103274, doi: 10.1016/j.fbio.2023.103274
M.D. Ruiz M., y J. Ruales, “Post-Harvest Alternatives in Banana Cultivation”, Agronomy, vol. 14, 2024. Art 2109, doi: 10.3390/agronomy14092109
M. Rizzo, M. Marcuzzo, A. Zangari, A Gasparetto, and A. Albarelli, “Fruit ripeness classification: A survey”, Artificial Intelligence in Agriculture, vol. 7, pp. 44-57, 2023, doi: 10.1016/j.aiia.2023.02.004
E.G. Freitas, “Ripening assessment classification using artificial intelligence Algorithms with electrochemical impedance spectroscopy data”, Master in Electrical and Computer Engineering, NOVA Univ., Portugal, 2023.
J.P. Bonilla-González, y F.A. Prieto-Ortíz, “Determinación del estado de maduración de frutos de feijoa mediante un sistema de visión por computador utilizando información de color. Rev. Investig. Desarro. Innov, vol. 7, no. 1, pp. 111-126, 2016, doi: 10.19053/20278306.v7.n1.2016.5603
S.S. Telsang, N.S. Rajpurohit, N.R. Rajput, R.A. Singh, A.B. Rajguru, H.N. Kumar, R.V. Karande, and S.P. Raje, “Fruit Ripeness and Estimated Harvesting Time Detection”, IJRASET, vol. 12, no. 9, pp. 398-401, Sep. 2024, doi: 10.22214/ijraset.2024.64193.
B.S. Reddy, and P. Srinivas, “Effect of Fruit Size and Maturity on Selected Mechanical Properties of Tomato”, Int. J. Pure App. Biosci., vol. 5, no. 4, pp. 1730-1737, Aug. 2017, doi: 10.18782/2320-7051.5723.
K. Kanchana, A. Senerath, N. Thiruchchelvan, A. Kumara, “Use of maturity traits to identify optimal harvestable maturity of banana Musa AAB cv. “Embul” in dry zone of Sri Lanka”, Open Agriculture, vol. 6, pp. 143-151, 2021, doi: 10.1515/opag-2021-0015
P.J. Ascencio B., S.F. Morales, y R. Aranda B., “Sistema de Maduración de frutas Mediante la Implementación de Arduino”, Ciencia Latina Revista Científica Multidisciplinar, vol. 8, no. 6, pp. 7499-7519, Nov.-Dic. 2024, doi: 10.37811/cl_rcm.v8i6.15445
L.R. Sucari, Y. Aroquipa D., E. Quispe Y., A. Sucari L., L.D. Quina Q., y F.A. Huanca T., “Visión artificial en reconocimiento de patrones para clasificación de frutas en agronegocios”, PURIQ, vol. 2, no. 2, pp. 167-180, May.-Ago. 2020, doi: 10.37073/puriq.2.2.76.
A.M. Pardo-Pardo, and W.J. Cuervo-Bejarano, “Assessing the impact of emerging technologies on sustainable fruit production: A systematic review of the literature”, Agronomía Colombiana, vol. 41, no. 3, pp. 1-10, 2023, doi: 10.15446/agron.colomb.v41n3.107255.
F. Xiao, H. Wang, Y. Xu, and R. Zhang, “Fruit Detection and Recognition Based on Deep Learning for Automatic Harvesting: An Overview and Review”, Agronomy, vol. 13, 2023, Art. 1625, doi: 10.3390/agronomy13061625
E. Ropelewska, and Y. Noutfia, “Application of image analysis and machine learning for the assessment of grape (Vitis L.) berry behavior under different storage conditions”, Eur Food Res Technol, vol. 250, pp. 935-944, 2024, doi: 10.1007/s00217-023-04441-4.
A. Muthulakshmi, and P.N. Renjith, "Classification of Durian Fruits based on Ripening with Machine Learning Techniques", presented at 2020 3rd International Conference on Intelligent Sustainable Systems (ICISS), Thoothukudi, India, 2020, pp. 542-547, doi: 10.1109/ICISS49785.2020.9316006.
A.D.M. Africa, A.R.V. Tabalan, and M.A.A. Tan, “Ripe Fruit Detection and Classification using Machine Learning”, International Journal of Emerging Trends in Engineering Research, vol. 8, no. 5, pp. 1845-1849, May. 2020, doi: 10.30534/ijeter/2020/60852020.
I.K. Opara, U.L. Opara, J.A. Okolie, and O.A. Fawole, “Machine Learning Application in Horticulture and Prospects for Predicting Fresh Produce Losses and Waste: A Review”, Plants, vol. 13, no. 9, 2024, Art. 1200, doi: 10.3390/plants13091200.
K.V. Baskar, R.N. Sri, S. Lavanya, V. Harisha, “Deep CNN Model for predicting shelf life of fresh fruits and vegetables using temperature simulation data for optimized transport and storage”, Journal for Educators, Teachers and Trainers, vol. 15, no. 5, pp. 425-434, 2024, doi: 10.47750/jett.2024.15.05.42.
A. Mohapatra, S. Shanmugasundaram, R. Malmathanraj, “Grading of ripening stages of red banana using dielectric properties changes and image processing approach”, Computers and Electronics in Agriculture, vol. 143, pp. 100-110, 2017, doi: 10.1016/j.compag.2017.10.010
L.Y. Chen, C.C. Wu, T.I. Chou, S.W. Chiu, K.T. Tang, “Development of a dual MOS electronic nose/camera system for improving fruit ripeness classification”, Sensors, vol. 18, no. 10, 2018, Art. 3256, doi: https://doi.org/10.3390/s18103256
Y.Y. Pu, D.W. Sun, M. Buccheri, M. Grassi, T.M.P. Cattaneo, A. Gowen, “Ripeness classification of Bananito fruit (Musa acuminata, AA): A comparison study of visible spectroscopy and hyperspectral imaging”, Food Analytical Methods, vol. 12, no. 8:1693-1704, 2019, doi: 10.1007/s12161-019-01506-7
I.A. Sabilla, C.S. Wahyuni, C. Fatichah, D. Herumurti, “Determining banana types and ripeness from image using machine learning methods”, in Proc. IEEE International Conference of Artificial Intelligence and Information Technology (ICAIIT), 2019, doi: 10.1109/ICAIIT.2019.8834490
N. Vetrekar, R. Ramachandra, K.B. Raja, R.S. Gad, “Multi-spectral imaging for artificial ripened banana detection”, in Proc. European Workshop on Visual Information Processing (EUVIP), 2019, doi: 10.1109/EUVIP47703.2019.8946158
M. Wankhade and U.W. Hore, “Banana Ripeness Classification Based on Image Processing with Machine Learning”, International Journal of Advanced Research in Science, Communication and Technology, vol. 6, no. 2, pp. 1390-1398, Jun. 2021, doi: 10.48175/IJARSCT-1571.
J.C. Hou, Y.H. Hu, L.X. Hou, K.Q. Guo, T. Satake, “Classification of ripening stages of bananas based on support vector machine”, Int J Agric & Biol Eng, vol. 8, no. 6, pp. 99-103, Dec. 2015.
H. Juncai, H. Yaohua, H. Lixia, G. Kangquan, and T. Satake, ‘‘Classification of ripening stages of bananas based on support vector machine’’, Int. J. Agric. Biol. Eng., vol. 8, no. 6, pp. 99-103, 2015.
W. He, H. He, F. Wang, S. Wang, R. Li, J. Chang, and C. Li, ‘‘Rapid and uninvasive characterization of bananas by hyperspectral imaging with extreme gradient boosting (XGBoost),’’ Anal. Lett., vol. 55, no. 4, pp. 620-633, 2021, doi: 10.1080/00032719.2021.1952214
A. Sanaeifar, S.S. Mohtasebi, M. Ghasemi-Varnamkhasti, H. Ahmadi, and J. Lozano, ‘‘Development and application of a new low cost electronic nose for the ripeness monitoring of banana using computational techniques (PCA, LDA, SIMCA, and SVM),’’ Czech J. Food Sci., vol. 32, no. 6, pp. 538–548, 2014
Y. Zhang, J. Lian, M. Fan, and Y. Zheng, “Deep indicator for fine-grained classification of banana’s ripening stages”, EURASIP Journal on Image and Video Processing, vol. 2018, 2018, Art. 46, doi: 10.1186/s13640-018-0284-8
A. Vacaro de Souza, J. Marques de Mello, V. Ferreira da Silva F., and F. Ferrari P., “Software for classification of banana ripening stage using machine learning”, Rev. Bras. Frutic., vol. 46, May. - Jun., 2024, Art. e-863, doi: 10.1590/0100-29452024863
R.R. Asaad, R.I. Ali, Z.A. Ali, A.A. Shaban, “Image Processing with Python Libraries”, Academic Journal of Nawroz University, vol. 12, no. 2, pp. 410-416, 2023, doi: 0.25007/ajnu.v12n2a1754
J. Broeke, J.M. Mateos P., and J. Pascau, Image Processing with ImageJ, Birmingham, UK: Packt Publishing Ltd., 2015.
H. Weller, M. Westneat, “Quantitative color profiling of images in a comparative framework using the R package colordistance”, PeerJ, vol. 7, 2019, Art. e6398, doi: 10.7717/peerj.6398
H. Weller, Package ‘colordistance’ – Distance Metrics for Image Color Similarity: (2022). CRAN. Accessed: Feb. 28.2025. [Online]. Available: https://cran.r-project.org/web/packages/colordistance/colordistance.pdf
H. Weller, Package ‘recolorize’ - Color-Based Image Segmentation: CRAN. Accessed: Feb. 28.2025. [Online]. Available: https://cran.r-project.org/web/packages/recolorize/recolorize.pdf
H. Weller, Color Distance Metrics. Accessed: Mar.03.2025. [Online]. Available: https://cran.r-project.org/web/packages/colordistance/vignettes/color-metrics.html
A. Inglis, Package ‘colouR’ - Create Colour Palettes from Images: CRAN. Accessed: Feb. 28.2025. [Online]. Available: https://cran.r-project.org/web/packages/colouR/colouR.pdf
A.C. Müller and S. Guido, Introduction to Machine Learning with Python, Sebastopol, CA, USA: O’Reilly Media, Inc., 2017.
B. Bhatt, A.S. Gaikwad, and G. Uganya, The Fundamentals of Machine Learning. London, UK: LAP LAMBERT Academic Publishing, 2023.
F.J. Ariza-López, J. Rodríguez-Avi, V. Alba-Fernández, “Control estricto de matrices de confusión por medio de distribuciones multinomiales”, GeoFocus, no. 21, pp. 215-226, 2018, doi: 10.21138/GF.591
W.S. Choo, “Fruit Pigment Changes During Ripening", in Encyclopedia of Food Chemistry, L. Melton, F. Shahidi, and P. Varelis, Ed(s), London, UK: Academic Press, 2019, pp. 117-123, doi: 10.1016/B978-0-08-100596-5.21656-9.
S.M. Chiwate, B.T. Jadhav, S.V. Nikam, “Analysis of Physicochemical Changes During the Ripening of Cavendish Banana and Velchi Banana”, Curr Agri Res, vol.1, no. 11, pp. 236-243, 2023, doi: 10.12944/CARJ.11.1.20
A. Anushya, “Quality Recognition of Banana Images using Classifiers”, International Journal of Computer Science and Mobile Computing, vol. 9, no. 1, pp. 100-106, Jan. 2020, Available https://ijcsmc.com/docs/papers/January2020/V9I1202018.pdf
Z.E. Fitri, M. Silvia, A. Madjid, A.M.N. Imron, and L.N. Sahenda, “Red Dragon Fruit (Hylocereus costaricensis) Ripeness Color Classification by Naïve Bayes Algorithm”, ATCSJ, vol. 5, no. 1, pp. 21–28, Jun. 2022, doi: 10.33086/atcsj.X.
R.G. de Luna, V.C. Magnaye, R.A.L. Reaño, K.L. Enriquez, M.K.O. Dungca, D.R.C. Filler. C.J.V. Cabrera, C.M. Reyes, S.A.J. Saballa, N.A.O. Maligalig, “Non-invasive Transport Tier Classification of Banana ‘Señorita’ (musa acuminata) Using Machine Learning Techniques”, in TENCON 2023 - 2023 IEEE Region 10 Conference, Chiang Mai, Thailand, Oct 1 – Nov 3, 2023. pp. 1039-1044, Available https://conf.papercept.net/images/temp/TENCON/files/0034.pdf
R. Kosasih, S. Sudaryanto, and A. Fahrurozi, “Classification of six banana ripeness levels based on statistical features on machine learning approach”, International Journal of Advances in Applied Sciences, vol. 12, no. 4, pp. 317-326, Dec. 2023, doi: 10.11591/ijaas.v12.i4.pp317-326.
A.H. Kahfi, M. Hasan, and R.L. Hasanah, “Classification of Banana Ripeness Based on Color and Texture Characteristics”, Journal of Computer Networks, Architecture and High Performance Computing, vol. 5, no. 1, pp. 10-17, Jan. 2023, doi: 10.47709/cnapc.vxix.xxxx
S.S. Khandarkar, V.R. Wadhankar, and D.S. Dabhade, “Detection and Identification of Artificially Ripened Fruits Using MATLAB”, International Research Journal of Engineering and Technology, vol. 6, no. 6, pp. 484-487, Jun. 2019, Available: https://www.irjet.net/archives/V6/i6/IRJET-V6I696.pdf
T. Girma, S.K. Mohapatra, B. Belete, “Feature Extraction and Classification of Green Mung Bean Using Machine Learning”, International Journal of Scientific & Engineering Research, vol. 10, no. 8, pp. 1443-1447, Aug. 2019, Available: https://www.ijser.org/researchpaper/Feature-Extraction-and-Classification-of-Green-Mung-Bean-Using-Machine-Learning.pdf
I.M.D. Moso, S.R.L. Puda, P.O. Timaan, and M.D.B. Jolito, “Evaluating the ripening stages of Musa acuminata x balbisiana (Saba) using 2D-image analysis”, Publiscience. Vol. 4, no. 1, pp. 93–98, 2021, Available: https://www.publiscience.org/wp-content/uploads/2021/08/Evaluation-of-the-ripening-stages-of-Saba-banana-using-2D-Image-analysis-1.pdf
B.S. Mithun, S. Shinde, K. Bhavsar, A. Chowdhury, S. Mukhopadhyay, K. Gupta, B. Bhowmick, S. Kimbahune, "Non-destructive method to detect artificially ripened banana using hyperspectral sensing and RGB imaging", in Proc. SPIE 10665, Sensing for Agriculture and Food Quality and Safety X, 106650T (15 May 2018), doi: 10.1117/12.2306367
E.Jr. Piedad, J.I. Larada, G.J. Pojas, L.V.V. Ferrer, “Postharvest classification of banana (Musa acuminata) using tier-based machine learning”, Postharvest Biology and Technology, Vol. 145, pp. 93-100, Nov. 2018, doi : 10.1016/j.postharvbio.2018.06.004
L. Ma, C. Liang, Y. Cui, H. Du, H. Liu, L. Zhu, Y. Yu, C. Lu, S. Benjakul, C. Brennan, M.A. Brennan, “Prediction of banana maturity based on the sweetness and color values of different segments during ripening”, Current Research in Food Science, vol. 5, pp. 1808-1817, 2022, doi : 10.1016/j.crfs.2022.08.024
C.A. Garillos-Manliguez, and J.Y. Chiang, “Multimodal Deep Learning and Visible-Light and Hyperspectral Imaging for Fruit Maturity Estimation”, Sensors (Basel), vol. 21, no. 4, 2021, Art. 1288, doi: 10.3390/s21041288
J. Pardede, M.G. Husada, A.N. Hermana, and S.A. Rumapea. “Fruit Ripeness Based on RGB, HSV, HSL, L*a*b* Color Feature Using SVM”, in: 2019 International Conference of Computer Science and Information Technology (ICoSNIKOM), pp. 1-5, 2019, Available: https://www.semanticscholar.org/paper/Fruit-Ripeness-Based-on-RGB,-HSV,-HSL,-L*a*b*-Color-Pardede-Husada/fb94b0aa454417c96f65737287ac2ea35a4a3714
C. Isaza, W. Ríos, J. Mosquera, “Modelo de maduración de fruto de banano empleando procesos gaussianos de regresión y filtros acusto-ópticos”, Scientia et Technica, vol. 14, no. 38, jun. 2008, disponible: https://www.redalyc.org/pdf/849/84903859.pdf
D.S. Prabha, and J.S. Kumar, “Assessment of banana fruit maturity by image processing technique”, J Food Sci Technol, vol. 52, no. 3, pp. 1316-1327, Mar. 2015, doi: 10.1007/s13197-013-1188-3
T. Ringer, and M. Blanke, “Non-invasive, real time in-situ techniques to determine the ripening stage of banana”, Food Measure, vol. 15, pp. 44266-4437, Jun. 2021, doi: 10.1007/s11694-021-01009-2
J. Zhuang, C. Hou, Y. Tang, Y. He, Q. Guo, A. Miao, Z. Zhong, and S. Luo, “Assessment of External Properties for Identifying Banana Fruit Maturity Stages Using Optical Imaging Techniques”, Sensors, vol. 19, no. 13, 2019, Art. 2910, doi: 10.3390/s19132910
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Revista Científica Ingeniería y Desarrollo.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.




