Identification of Indonesian Traditional Foods Using Machine Learning and Supported by Segmentation Methods

Abdul Haris Rangkuti - Bina Nusantara University, Bandung Campus, Jakarta, Indonesia
Johan Muliadi Kerta - Bina Nusantara University, Bandung Campus, Jakarta, Indonesia
Roderik Yohanes Mogot - Bina Nusantara University, Bandung Campus, Jakarta, Indonesia
Varyl Hasbi Athala - Bina Nusantara University, Bandung Campus, Jakarta, Indonesia


Citation Format:



DOI: http://dx.doi.org/10.62527/joiv.8.4.2545

Abstract


Traditional food is essential in preserving cultural heritage and is a vital part of Indonesian cuisine. In this research, we implement a methodology to identify the traditional Indonesian food using machine learning algorithms supported by various segmentation methods. This research aims to provide an efficient and accurate approach to classifying traditional foods, which can contribute to promoting and preserving Indonesia's culinary heritage. To conduct this research, we conducted experiments on 34 types of conventional Indonesian food originating from various provinces in Indonesia. The analysis of food images involved several segmentation algorithms, including Sobel, Prewitt, Robert, Scharr, and Canny filters. After the segmentation process, we proceeded with feature extraction and classification using traditional machine learning algorithms such as the Random Forest algorithm, Decision Tree, and derivatives of the SVM algorithm. These algorithms aimed to recognize the 34 types of traditional food. After conducting several experiments, we found that Random Forest with Robert's segmentation method was the highest-performance algorithm. It produced extraordinarily accurate results on the test dataset, with an accuracy performance of 85.52%, recall of 84.63%, precision of 83.77%, and an f1 score of 82.49%. Additionally, the best-performing algorithms with execution time averaged less than 1 minute. Another experimental result showed that the Random Forest algorithm with the Canny operator achieved an accuracy of 81.51%, recall of 84.97%, precision of 86.8%, and an f1 score of 85.61% on the test dataset. Furthermore, the Random Forest algorithm with the Sobel operator achieved accuracy results of 78.4%, recall of 65.3%, precision of 62.3%, and an f1 score of 63.71%.  In the SVM algorithms derivative, the Sigmoid SVM combined with the Scharr operator achieved the highest performance in its category across all classification metrics. In conclusion, this research offers valuable insights into classifying traditional Indonesian dishes using traditional machine learning algorithms. Simultaneously, this research aims to promote the appropriate and effective preservation and recognition of traditional Indonesian food.


Keywords


Traditional food; SVM; decision tree; random forest; segmentation; machine learning

Full Text:

PDF

References


A. Wibisono, H. A. Wisesa, Z. P. Rahmadhani, K. Fahira, P. Mursanto, and W. Jatmiko, “Traditional food knowledge of Indonesia: a new high-quality food dataset and automatic recognition system,” J. Big Data, vol. 7, no. 1, pp. 1–19, Dec. 2020, doi: 10.1186/s40537-020-00342-5.

A. M. Jiménez-Carvelo, A. González-Casado, M. G. Bagur-González, and L. Cuadros-Rodríguez, “Alternative data mining/machine learning methods for the analytical evaluation of food quality and authenticity – A review,” Food Res. Int., vol. 122, pp. 25–39, Aug. 2019, doi:10.1016/j.foodres.2019.03.063.

P. K. Fahira, Z. P. Rahmadhani, P. Mursanto, A. Wibisono, and H. A. Wisesa, “Classical Machine Learning Classification for Javanese Traditional Food Image,” ICICoS 2020 - Proceeding 4th Int. Conf. Informatics Comput. Sci., Nov. 2020, doi:10.1109/icicos51170.2020.9299039.

N. Martinel, G. L. Foresti, and C. Micheloni, “Wide-Slice Residual Networks for Food Recognition,” Proc. - 2018 IEEE Winter Conf. Appl. Comput. Vision, WACV 2018, vol. 2018-Janua, pp. 567–576, Dec. 2016, doi: 10.1109/wacv.2018.00068.

R. P. Prasetya and F. A. Bachtiar, “Indonesian food items labeling for tourism information using Convolution Neural Network,” Proc. - 2017 Int. Conf. Sustain. Inf. Eng. Technol. SIET 2017, vol. 2018-January, pp. 327–331, Jul. 2017, doi: 10.1109/siet.2017.8304158.

R. H. Hridoy, F. Akter, M. Mahfuzullah, and F. Ferdowsy, “A Computer Vision Based Food Recognition Approach for Controlling Inflammation to Enhance Quality of Life of Psoriasis Patients,” 2021 Int. Conf. Inf. Technol. ICIT 2021 - Proc., pp. 543–548, Jul. 2021, doi:10.1109/icit52682.2021.9491783.

L. M. Amugongo, A. Kriebitz, A. Boch, and C. Lütge, “Mobile Computer Vision-Based Applications for Food Recognition and Volume and Calorific Estimation: A Systematic Review,” Healthc. 2023, Vol. 11, Page 59, vol. 11, no. 1, p. 59, Dec. 2022, doi:10.3390/healthcare11010059.

Z. Shen, A. Shehzad, S. Chen, H. Sun, and J. Liu, “Machine Learning Based Approach on Food Recognition and Nutrition Estimation,” Procedia Comput. Sci., vol. 174, pp. 448–453, Jan. 2020, doi:10.1016/j.procs.2020.06.113.

G. Ravivarma, K. Gavaskar, D. Malathi, K. G. Asha, B. Ashok, and S. Aarthi, “Implementation of Sobel operator based image edge detection on FPGA,” Mater. Today Proc., vol. 45, pp. 2401–2407, Jan. 2021, doi: 10.1016/j.matpr.2020.10.825.

R. G. Zhou, H. Yu, Y. Cheng, and F. X. Li, “Quantum image edge extraction based on improved Prewitt operator,” Quantum Inf. Process., vol. 18, no. 9, pp. 1–24, Sep. 2019, doi: 10.1007/S11128-019-2376-5.

Y. Song, B. Ma, and W. Gao, “Medical Image Edge Detection Based on Improved Differential Evolution Algorithm and Prewitt Operator,” Acta Microsc., vol. 28, no. 1, 2019.

B. Liao, H. Zuo, X. Chen, Y. Yu, and Y. Li, “Few-Shot Brain Tumor MRI Image Classification Using Graph Isomorphic Network and Prewitt Operator,” SSRN Electron. J., Sep. 2022, doi:10.2139/ssrn.4213123.

A. H. Abdel-Gawad, L. A. Said, and A. G. Radwan, “Optimized Edge Detection Technique for Brain Tumor Detection in MR Images,” IEEE Access, vol. 8, pp. 136243–136259, 2020, doi:10.1109/access.2020.3009898.

F. Orujov, R. Maskeliūnas, R. Damaševičius, and W. Wei, “Fuzzy based image edge detection algorithm for blood vessel detection in retinal images,” Appl. Soft Comput. J., vol. 94, Sep. 2020, doi:10.1016/j.asoc.2020.106452.

G. N. Chaple, R. D. Daruwala, and M. S. Gofane, “Comparisions of Robert, Prewitt, Sobel operator based edge detection methods for real time uses on FPGA,” Proc. - Int. Conf. Technol. Sustain. Dev. ICTSD 2015, Apr. 2015, doi: 10.1109/ictsd.2015.7095920.

Z. A. Seghir and F. Hachouf, “Image quality assessment scheme based on gradient similarity and color distortion,” 12th Int. Symp. Program. Syst. ISPS 2015, pp. 193–200, Sep. 2015, doi:10.1109/isps.2015.7244985.

Y. Wang, Z. Xiao, and G. Cao, “A convolutional neural network method based on Adam optimizer with power-exponential learning rate for bearing fault diagnosis,” J. Vibroengineering, vol. 24, no. 4, pp. 666–678, Jun. 2022, doi: 10.21595/jve.2022.22271.

Y. A. Sari et al., “Indonesian Traditional Food Image Identification using Random Forest Classifier based on Color and Texture Features,” Proc. 2019 4th Int. Conf. Sustain. Inf. Eng. Technol. SIET 2019, pp. 206–211, Sep. 2019, doi: 10.1109/SIET48054.2019.8986058.

E. A. Sekehravani, E. Babulak, and M. Masoodi, “Implementing canny edge detection algorithm for noisy image,” Bull. Electr. Eng. Informatics, vol. 9, no. 4, pp. 1404–1410, Aug. 2020, doi:10.11591/eei.v9i4.1837.

M. Kalbasi and H. Nikmehr, “Noise-Robust, Reconfigurable Canny Edge Detection and its Hardware Realization,” IEEE Access, vol. 8, pp. 39934–39945, 2020, doi: 10.1109/access.2020.2976860.

S. K. T. Hwa, A. Bade, M. H. A. Hijazi, and M. S. Jeffree, “Tuberculosis detection using deep learning and contrastenhanced canny edge detected X-Ray images,” IAES Int. J. Artif. Intell., vol. 9, no. 4, pp. 713–720, Dec. 2020, doi: 10.11591/ijai.v9.i4.pp713-720.

B. Iqbal, W. Iqbal, N. Khan, A. Mahmood, and A. Erradi, “Canny edge detection and Hough transform for high resolution video streams using Hadoop and Spark,” Cluster Computing, vol. 23, no. 1, pp. 397–408, Apr. 2019, doi: 10.1007/s10586-019-02929-x.

L. H. Gong, C. Tian, W. P. Zou, and N. R. Zhou, “Robust and imperceptible watermarking scheme based on Canny edge detection and SVD in the contourlet domain,” Multimed. Tools Appl., vol. 80, no. 1, pp. 439–461, Jan. 2021, doi: 10.1007/S11042-020-09677-W.

Y. L. Chung and C. K. Lin, “Application of a Model that Combines the YOLOv3 Object Detection Algorithm and Canny Edge Detection Algorithm to Detect Highway Accidents,” Symmetry 2020, Vol. 12, Page 1875, vol. 12, no. 11, p. 1875, Nov. 2020, doi:10.3390/sym12111875.

B. Li, F. He, and X. Zeng, “A novel privacy-preserving outsourcing computation scheme for Canny edge detection,” The Visual Computer, vol. 38, no. 12, pp. 4437–4455, Oct. 2021, doi: 10.1007/s00371-021-02307-y.

M. A. F. Malbog, L. L. Lacatan, R. M. Dellosa, Y. D. Austria, and C. F. Cunanan, “Edge Detection Comparison of Hybrid Feature Extraction for Combustible Fire Segmentation: A Canny vs Sobel Performance Analysis,” 2020 11th IEEE Control Syst. Grad. Res. Colloquium, ICSGRC 2020 - Proc., pp. 318–322, Aug. 2020, doi:10.1109/icsgrc49013.2020.9232632.

J. Trivedi, M. S. Devi, and D. Dhara, “Canny edge detection based real-time intelligent parking management system,” Sci. J. Silesian Univ. Technol. Ser. Transp., vol. 106, pp. 197–208, 2020, doi:10.20858/sjsutst.2020.106.17.

S. B. Utomo, J. F. Irawan, and R. R. Alinra, “Early warning flood detector adopting camera by Sobel Canny edge detection algorithm method,” Indones. J. Electr. Eng. Comput. Sci., vol. 22, no. 3, pp. 1796–1802, Jun. 2021, doi: 10.11591/ijeecs.v22.i3.pp1796-1802.

J. D. Zambrano Jara and S. Bowen, “Learning Curve Analysis on Adam, Sgd, and Adagrad Optimizers on a Convolutional Neural Network Model for Cancer Cells Recognition,” ADCAIJ Adv. Distrib. Comput. Artif. Intell. Journal, Vol. 11, No. 3, 2022, págs. 263-283, vol. 11, no. 3, pp. 263–283, 2022.

S. He, J. Wu, D. Wang, and X. He, “Predictive modeling of groundwater nitrate pollution and evaluating its main impact factors using random forest,” Chemosphere, vol. 290, p. 133388, Mar. 2022, doi: 10.1016/j.chemosphere.2021.133388.

J. L. Speiser, M. E. Miller, J. Tooze, and E. Ip, “A comparison of random forest variable selection methods for classification prediction modeling,” Expert Syst. Appl., vol. 134, pp. 93–101, Nov. 2019, doi:10.1016/j.eswa.2019.05.028.

C. M. Yeşilkanat, “Spatio-temporal estimation of the daily cases of COVID-19 in worldwide using random forest machine learning algorithm,” Chaos, Solitons & Fractals, vol. 140, p. 110210, Nov. 2020, doi: 10.1016/j.chaos.2020.110210.

A. Kurani, P. Doshi, A. Vakharia, and M. Shah, “A Comprehensive Comparative Study of Artificial Neural Network (ANN) and Support Vector Machines (SVM) on Stock Forecasting,” Annals of Data Science, vol. 10, no. 1, pp. 183–208, Jun. 2021, doi: 10.1007/s40745-021-00344-x.

J. Gu and S. Lu, “An effective intrusion detection approach using SVM with naïve Bayes feature embedding,” Comput. Secur., vol. 103, p. 102158, Apr. 2021, doi: 10.1016/j.cose.2020.102158.

P. H. Prastyo, A. S. Sumi, A. W. Dian, and A. E. Permanasari, “Tweets Responding to the Indonesian Government’s Handling of COVID-19: Sentiment Analysis Using SVM with Normalized Poly Kernel,” J. Inf. Syst. Eng. Bus. Intell., vol. 6, no. 2, p. 112, Oct. 2020, doi:10.20473/jisebi.6.2.112-122.

M. R. Reddy, “Implementation of SVM machine learning Algorithm to predict lung And Breast Cancer,” Turkish J. Comput. Math. Educ., vol. 12, no. 12, pp. 3050–3060, May 2021, doi: ]10.17762/turcomat.V12I12.7976.

D. A. Pisner and D. M. Schnyer, “Support vector machine,” Mach. Learn. Methods Appl. to Brain Disord., pp. 101–121, Jan. 2019, doi: ]10.1016/B978-0-12-815739-8.00006-7.

A. Altan and S. Karasu, “The Effect Of Kernel Values In Support Vector Machine To Forecasting Performance Of Financial Time Series And Cognitive Decision Making,” J. Cogn. Syst., vol. 4, no. 1, 2019, Accessed: Apr. 08, 2024.

H. Lu and X. Ma, “Hybrid decision tree-based machine learning models for short-term water quality prediction,” Chemosphere, vol. 249, p. 126169, Jun. 2020, doi:10.1016/j.chemosphere.2020.126169.

M. Jena, R. K. Behera, and S. Dehuri, “Hybrid Decision Tree for Machine Learning: A Big Data Perspective,” Intell. Syst. Ref. Libr., vol. 218, pp. 223–239, 2022, doi: 10.1007/978-981-16-8930-7_9.

M. V. Gwetu, J. R. Tapamo, and S. Viriri, “Random Forests with a Steepend Gini-Index Split Function and Feature Coherence Injection,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 12081 LNCS, pp. 255–272, 2020, doi:10.1007/978-3-030-45778-5_17.

J. W. Dunn, “Optimal trees for prediction and prescription,” Massachusetts Inst. Technol., 2018, Accessed: Apr. 08, 2024. [Online]. Available: https://dspace.mit.edu/handle/1721.1/119280.

A. Shirzadi et al., “A comparative study between popular statistical and machine learning methods for simulating volume of landslides,” Catena, vol. 157, pp. 213–226, Oct. 2017, doi:10.1016/j.catena.2017.05.016.

K. M. Mendez, S. N. Reinke, and D. I. Broadhurst, “A comparative evaluation of the generalised predictive ability of eight machine learning algorithms across ten clinical metabolomics data sets for binary classification,” Metabolomics, vol. 15, no. 12, Dec. 2019, doi:10.1007/S11306-019-1612-4.

P. Gaspar, J. Carbonell, and J. L. Oliveira, “On the parameter optimization of Support Vector Machines for binary classification,” Journal of Integrative Bioinformatics, vol. 9, no. 3, pp. 33–43, Dec. 2012, doi: 10.1515/jib-2012-201.

M. A. Nanda, K. B. Seminar, D. Nandika, and A. Maddu, “A Comparison Study of Kernel Functions in the Support Vector Machine and Its Application for Termite Detection,” Inf. 2018, Vol. 9, Page 5, vol. 9, no. 1, p. 5, Jan. 2018, doi: 10.3390/info9010005.

H. F. Kareem, M. S. AL-Husieny, F. Y. Mohsen, E. A. Khalil, and Z. S. Hassan, “Evaluation of SVM performance in the detection of lung cancer in marked CT scan dataset,” Indones. J. Electr. Eng. Comput. Sci., vol. 21, no. 3, pp. 1731–1738, Mar. 2021, doi:10.11591/ijeecs.v21.i3.pp1731-1738.

R. J. Janssen, J. Mourão-Miranda, and H. G. Schnack, “Making Individual Prognoses in Psychiatry Using Neuroimaging and Machine Learning,” Biol. Psychiatry Cogn. Neurosci. Neuroimaging, vol. 3, no. 9, pp. 798–808, Sep. 2018, doi: 10.1016/j.bpsc.2018.04.004.

O. B. Sezer, M. U. Gudelek, and A. M. Ozbayoglu, “Financial time series forecasting with deep learning: A systematic literature review: 2005–2019,” Appl. Soft Comput. J., vol. 90, May 2020, doi:10.1016/j.asoc.2020.106181.

M. A. Muñoz, L. Villanova, D. Baatar, and K. Smith-Miles, “Instance spaces for machine learning classification,” Mach. Learn., vol. 107, no. 1, pp. 109–147, Jan. 2018, doi: 10.1007/S10994-017-5629-5.

L. N. Mahdy, K. A. Ezzat, H. H. Elmousalami, H. A. Ella, and A. E. Hassanien, “Automatic X-ray COVID-19 Lung Image Classification System based on Multi-Level Thresholding and Support Vector Machine,” medRxiv, p. 2020.03.30.20047787, Apr. 2020, doi:10.1101/2020.03.30.20047787.

D.-T. Mai, “Study on An Efficient Artificial Intelligence Architecture for Image Classification,” University of Electro-Communications, 2023.

L. Muflikhah and D. J. Haryanto, “High Performance of Polynomial Kernel at SVM Algorithm for Sentiment Analysis,” J. Inf. Technol. Comput. Sci., vol. 3, no. 2, pp. 194–201, Nov. 2018, doi:10.25126/jitecs.20183260.

Md. Hossain Ali, Sadia Afrin, Redwanul Islam, and Md. Rafiqul Islam, “Detection of COVID-19 infected lungs from chest x-ray using wavelet transform, HOG features extraction and SVM,” Global Journal of Engineering and Technology Advances, vol. 13, no. 2, pp. 001–011, Nov. 2022, doi: 10.30574/gjeta.2022.13.2.0086.

D. G. Na, W. Paik, J. Cha, H. Y. Gwon, S. Y. Kim, and R. E. Yoo, “Diagnostic performance of the modified Korean Thyroid Imaging Reporting and Data System for thyroid malignancy according to nodule size: a comparison with five society guidelines,” Ultrason. (Seoul, Korea), vol. 40, no. 4, pp. 474–485, 2021.

P. Dini, A. Elhanashi, A. Begni, S. Saponara, Q. Zheng, and K. Gasmi, “Overview on Intrusion Detection Systems Design Exploiting Machine Learning for Networking Cybersecurity,” Applied Sciences, vol. 13, no. 13, p. 7507, Jun. 2023, doi: 10.3390/app13137507.

Md. A. Talukder, S. Sharmin, M. A. Uddin, M. M. Islam, and S. Aryal, “MLSTL-WSN: machine learning-based intrusion detection using SMOTETomek in WSNs,” International Journal of Information Security, vol. 23, no. 3, pp. 2139–2158, Mar. 2024, doi:10.1007/s10207-024-00833-z.

R. R. Asaad and A. M. Abdulazeez, “Comprehensive Classification of Iris Flower Species: A Machine Learning Approach,” Indonesian Journal of Computer Science, vol. 13, no. 1, Feb. 2024, doi:10.33022/ijcs.v13i1.3717.

A. Shokrzade, M. Ramezani, F. Akhlaghian Tab, and M. Abdulla Mohammad, “A novel extreme learning machine based kNN classification method for dealing with big data,” Expert Systems with Applications, vol. 183, p. 115293, Nov. 2021, doi:10.1016/j.eswa.2021.115293.

N. Ali, D. Neagu, and P. Trundle, “Evaluation of k-nearest neighbour classifier performance for heterogeneous data sets,” SN Applied Sciences, vol. 1, no. 12, Nov. 2019, doi: 10.1007/s42452-019-1356-9.

A. Yaqoob, R. Musheer Aziz, and N. K. verma, “Applications and Techniques of Machine Learning in Cancer Classification: A Systematic Review,” Human-Centric Intelligent Systems, vol. 3, no. 4, pp. 588–615, Sep. 2023, doi: 10.1007/s44230-023-00041-3.