Spices are an important commodity in Indonesia; however, visual identification remains challenging due to the similarity in appearance among different types of spices. This study develops an image classification system for Indonesian spices using transfer learning by comparing four Convolutional Neural Network (CNN) architectures: VGG16, ResNet50, EfficientNetB0, and MobileNetV2. The Indonesian Spices dataset consists of 31 classes with a total of 6,510 images, which were stratified and divided into training, validation, and testing sets. The training process was conducted in two stages: head-layer training and fine-tuning, with the application of regularization techniques such as dropout, batch normalization, and L2 regularization. The results show that ResNet50 achieved the best performance with a test accuracy of 95.80%, followed by VGG16 with 95.70%. EfficientNetB0 provided an optimal balance between accuracy (94.17%) and the fastest inference time (5.51 ms), while MobileNetV2 achieved an inference time of 6.07 ms with an accuracy of 92.63%, making it suitable for mobile devices. This study demonstrates the effectiveness of transfer learning for Indonesian spice image classification.
Copyrights © 2026