PyTorch Deep Learning for Food Image Classification with Food Dataset


  • Iswahyudi Pradita University, Tangerang, Indonesia
  • Djarot Hindarto Informatics Study Program, Faculty of Communication and Informatics Technology, Universitas Nasional, Jakarta, Indonesia
  • Handri Santoso Pradita University, Tangerang, Indonesia




Convolutional Neural Networks, Classification, Food Image, PyTorch, Image Datasets


Classification of food images is crucial in today's increasingly digitally connected world. In the rapidly evolving mobile applications and social media era, the demand for an automated system that can recognize food types from an image is intensifying. This study employs deep learning and the PyTorch framework to develop a dependable and efficient solution for classifying food images. This research is motivated by the growing complexity of food introduction challenges. The primary challenge is improving the accuracy of food type recognition and overcoming variations in the visual presentation of food, such as lighting, shooting angles, and proportional and textural differences. Convolutional Neural Networks (CNN) are effective for image classification and are incorporated into the methods utilized. In addition, we employ ResNet101 transfer learning techniques to capitalize on the knowledge of trained models for large image datasets. The primary objective of this study is to develop a food image classification model that is accurate, training-efficient, and capable of accurately recognizing various types of food. In testing and evaluation, the developed model could realize multiple types of food with satisfactory accuracy. The accuracy of training reached 99.35%, while the accuracy of testing reached 94.65%. This study also reveals how Resnet101 transfer learning is utilized by deep learning technology.

GS Cited Analysis


Download data is not yet available.


Adedeji, B. P. (2023). Electric vehicles survey and a multifunctional artificial neural network for predicting energy consumption in all-electric vehicles. Results in Engineering, 19(July), 101283.

Chena, Y., Lina, Y., Xua, X., Dinga, J., Li, C., Zenga, Y., Liue, W., Xie, W., & Huang, J. (2022). Classification of lungs infected COVID-19 images based on inception-ResNet. Computer Methods and Programs in Biomedicine.

Czinege, I., & Harangozó, D. (2023). Application of artificial neural networks for characterisation of formability properties of sheet metals. International Journal of Lightweight Materials and Manufacture.

Dhanush, G., Khatri, N., Kumar, S., & Shukla, P. K. (2023). A comprehensive review of machine vision systems and artificial intelligence algorithms for the detection and harvesting of agricultural produce. Scientific African, 21(July), e01798.

Djenouri, Y., Belhadi, A., Srivastava, G., & Lin, J. C. W. (2023). Hybrid graph convolution neural network and branch-and-bound optimization for traffic flow forecasting. Future Generation Computer Systems, 139, 100–108.

Gawade, S., Bhansali, A., Patil, K., & Shaikh, D. (2023). Application of the convolutional neural networks and supervised deep-learning methods for osteosarcoma bone cancer detection. Healthcare Analytics, 3(February), 100153.

Hindarto, D., & Santoso, H. (2021). Plat Nomor Kendaraan dengan Convolution Neural Network. Jurnal Inovasi Informatika, 6(2), 1–12.

Kumar, A., & Seeja, K. R. (2023). Periocular Region based Gender Identification using Transfer Learning. International Journal of Cognitive Computing in Engineering, 4(July), 277–286.

Niswati, Z., Hardatin, R., Muslimah, M. N., & Hasanah, S. N. (2021). Perbandingan Arsitektur ResNet50 dan ResNet101 dalam Klasifikasi Kanker Serviks pada Citra Pap Smear. Faktor Exacta, 14(3), 160.

Ozbayoglu, A. M., & Yuksel, H. E. (2012). Analysis of gas-liquid behavior in eccentric horizontal annuli with image processing and artificial intelligence techniques. Journal of Petroleum Science and Engineering, 81, 31–40.

Pérez-García, F., Sparks, R., & Ourselin, S. (2021). TorchIO: A Python library for efficient loading, preprocessing, augmentation and patch-based sampling of medical images in deep learning. Computer Methods and Programs in Biomedicine, 208.

Pribanić, I., Simić, S. D., Tanković, N., Debeljuh, D. D., & Jurković, S. (2023). Reduction of SPECT acquisition time using deep learning: A phantom study. Physica Medica, 111(January).

Saputra, A. D., Hindarto, D., & Santoso, H. (2023). Disease Classification on Rice Leaves using DenseNet121, DenseNet169, DenseNet201. Sinkron, 8(1), 48–55.

Swift, J. R., Turner, M. A., & Reynolds, J. C. (2023). A rapid dynamic headspace method for authentication of whiskies using artificial neural networks. Food Chemistry Advances, 3(June), 100417.

Sze, E., Santoso, H., & Hindarto, D. (2022). Review Star Hotels Using Convolutional Neural Network. 7(1), 2469–2477.

Zimmermann, L., Buschmann, M., Herrmann, H., Heilemann, G., Kuess, P., Goldner, G., Nyholm, T., Georg, D., & Nesvacil, N. (2021). An MR-only acquisition and artificial intelligence based image-processing protocol for photon and proton therapy using a low field MR. Zeitschrift Fur Medizinische Physik, 31(1), 78–88.


Crossmark Updates

How to Cite

Iswahyudi, I., Hindarto, D., & Santoso, H. . (2023). PyTorch Deep Learning for Food Image Classification with Food Dataset. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 8(4), 2651-2661.

Most read articles by the same author(s)

1 2 3 4 > >>