ADDITIONAL MENU
Spice Image Classification Using ResNet50 and Augmentation Technique
Abstract
This research aimed to develop an automatic classification system for Indonesian spices using a deep learning approach based on the ResNet50 architecture. The classification task involved 31 spice categories with 210 images per class. Two training strategies were implemented: training the model from scratch and using transfer learning with pre-trained weights from ImageNet. The model trained from scratch achieved a validation accuracy of 57%, while the transfer learning approach combined with fine-tuning of the last 33 layers resulted in a significantly higher validation accuracy of 96%. Image preprocessing, data augmentation, and class weighting were applied to improve the model’s generalization and handle data imbalance. The confusion matrix analysis showed that most predictions aligned with the true labels, especially in the transfer learning model. These findings demonstrate that transfer learning with ResNet50 can effectively classify spice images with high accuracy, even when visual similarity between certain classes exists. This research highlights the potential of deep convolutional neural networks to support automatic and reliable identification systems for biodiversity mapping and agricultural industries
Keywords
Convolutional Neural Network; Deep Learning; ResNet50; Spice Classification; Transfer Learning
References
C. Nelly, L. Fitriyana, T. D. Santi, and Saudah, “Diversity of traditional vegetables and spices as local food security for the Gayo Tribe, Aceh, Indonesia,” Biodiversitas, vol. 25, no. 12, pp. 4699–4711, 2024, doi: 10.13057/biodiv/d251206.
I. N. Suandana and W. Apriandari, “Pemanfaatan CNN (Convolutional neural network) dan MobileNetV2 dalam klasifikasi rempah-rempah lokal di Indonesia,” vol. 8, no. 5, pp. 10109–10116, 2024.
K. He, “Deep Residual Learning for Image Recognition”.
V. N. Juli and N. T. Timur, “Klasifikasi Citra Digital Bumbu dan Rempah Dengan Algoritma Convolutional Neural Network ( CNN ) 1 . Klasifikasi Citra Digital : artikel atau elemen dalam gambar terkomputerisasi ke dalam klasifikasi atau kelas yang telah,” vol. 2, no. 3, 2024.
A. E. Putra, M. F. Naufal, and V. R. Prasetyo, “Klasifikasi Jenis Rempah Menggunakan Convolutional Neural Network dan Transfer Learning,” J. Edukasi dan Penelit. Inform., vol. 9, no. 1, p. 12, 2023, doi: 10.26418/jp.v9i1.58186.
C. Nisa and F. Candra, “Klasifikasi Jenis Rempah-Rempah Menggunakan Algoritma Convolutional Neural Network,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 4, no. 1, pp. 78–84, 2023, doi: 10.57152/malcom.v4i1.1018.
R. Maulana, R. Dwi Zahra Putri, T. Ade Amelia, H. Syahputra, and F. Ramadhani, “Identifikasi Jenis Rempah-Rempah Indonesia Dengan Convolutional Neural Network (Cnn) Menggunakan Arsitektur Vgg16,” JATI (Jurnal Mhs. Tek. Inform., vol. 8, no. 4, pp. 6034–6039, 2024, doi: 10.36040/jati.v8i4.10138.
H. P. Tran, H. T. Diem Tuyet, T. Q. Dang Khoa, L. N. Lam Thuy, P. T. Bao, and V. N. Thanh Sang, “Microscopic Video-Based Grouped Embryo Segmentation: A Deep Learning Approach,” Cureus, vol. 15, no. 9, 2023, doi: 10.7759/cureus.45429.
S. Jasmine and P. Marichamy, “MNR2NeXt-50: Segmentation and quantification of epicardial fat from cardiac CT images using transfer learning with an optimized ensemble model,” J. Radiat. Res. Appl. Sci., vol. 18, no. 3, p. 101648, 2025, doi: 10.1016/j.jrras.2025.101648.
Weber, “Classification of Images To Detect Distracted Drivers By Using,” 2023.
H. Khalifeh, “Olive Leaf Disease Detection Using Deep Learning Empowering Palestinian Agriculture with AI,” no. June, 2025, doi: 10.13140/RG.2.2.27931.37923/1.
J. I. Mestre, S. Barrachina, D. Quezada, and M. F. Dolz, “Deep learning inference optimisation for IoT: Conv2D-ReLU-BN layer fusion and quantisation,” J. Supercomput., vol. 81, no. 4, 2025, doi: 10.1007/s11227-025-07107-y.
B. Kim et al., “Deep Learning Activation Layer-Based Wall Quality Recognition Using Conv2D ResNet Exponential Transfer Learning Model,” Mathematics, vol. 10, no. 23, 2022, doi: 10.3390/math10234602.
L. Wen, Z. Xiao, X. Xu, and B. Liu, “Disaster Recognition and Classification Based on Improved ResNet-50 Neural Network,” 2025.
S. Thite, D. Godse, K. Patil, and P. Chumchu, “Facilitating spice recognition and classification : An image dataset of Indian spices Facilitating spice recognition and classification : An image dataset of Indian spices,” Data Br., vol. 57, no. October, p. 110936, 2024, doi: 10.1016/j.dib.2024.110936.
S. Kanakala and S. Ningappa, “Detection and Classification of Diseases in Multi-Crop Leaves using LSTM and CNN Models,” J. Innov. Image Process., vol. 7, no. 1, pp. 161–181, 2025, doi: 10.36548/jiip.2025.1.008.
D. Juodelyte, A. Jiménez-Sánchez, and V. Cheplygina, “Revisiting Hidden Representations in Transfer Learning for Medical Imaging,” Trans. Mach. Learn. Res., vol. 2023, pp. 1–19, 2023.
C. N. N. Fine-tuning, “Optimizing South Kalimantan Food Image Classification Through,” vol. 10, no. 4, pp. 897–913, 2025, doi: 10.26555/jiteki.v10i4.30325.
L. Campbell, “Transfer Learning in Image Classification Tasks for Small Datasets,” no. June, 2025.
R. Ren, S. Zhang, H. Sun, and T. Gao, “Research on Pepper External Quality Detection Based on Transfer Learning Integrated with Convolutional Neural Network,” 2021.
DOI: http://dx.doi.org/10.24014/ijaidm.v8i3.37862
Refbacks
- There are currently no refbacks.
Office and Secretariat:
Big Data Research Centre
Puzzle Research Data Technology (Predatech)
Laboratory Building 1st Floor of Faculty of Science and Technology
UIN Sultan Syarif Kasim Riau
Jl. HR. Soebrantas KM. 18.5 No. 155 Pekanbaru Riau – 28293
Website: http://predatech.uin-suska.ac.id/ijaidm
Email: ijaidm@uin-suska.ac.id
e-Journal: http://ejournal.uin-suska.ac.id/index.php/ijaidm
Phone: 085275359942
Journal Indexing:
Google Scholar | ROAD | PKP Index | BASE | ESJI | General Impact Factor | Garuda | Moraref | One Search | Cite Factor | Crossref | WorldCat | Neliti | SINTA | Dimensions | ICI Index Copernicus
IJAIDM Stats










