Indonesia is a megabiodiversity country with extensive use of traditional medicinal plants; however, plant identification in natural environments remains largely manual and error-prone. Recent advances in deep learning, particularly Vision Transformer (ViT), provide a promising solution by effectively capturing global spatial features for image classification. This study applies a ViT-Base/16 model to automatically classify fruit and leaf images of Indonesian medicinal plants. The dataset comprises 1,000 field-collected images from Galung Village, West Sulawesi, covering 20 classes (10 medicinal and 10 non-medicinal plants). The model was fine-tuned using the AdamW optimizer with a learning rate of 2×10⁻⁵ and trained for 30 epochs with cosine annealing. The proposed approach achieved high performance, with 99.33% accuracy, 99.41% precision, 99.33% recall, and a 99.33% F1-score, while binary classification between medicinal and non-medicinal plants reached 100% accuracy. The system was deployed as a Flask-based web application, demonstrating reliable functionality and practical response times. Overall, the results confirm the effectiveness of Vision Transformer for medicinal plant classification under natural conditions and highlight its potential to support digital documentation, education, and the preservation of local ethnobotanical knowledge.
Copyrights © 2026