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