Fine-Grained Plant Classification using Vision Transformers with Optimized MLP Heads

Authors

  • Koko Yuardi Institut Teknologi Kalimantan, Indonesia
  • Gusti Ahmad Fanshuri Alfarisy Institut Teknologi Kalimantan, Indonesia
  • Ramadhan Paninggalih Institut Teknologi Kalimantan, Indonesia

DOI:

https://doi.org/10.31961/eltikom.v9i2.1500

Keywords:

fine-grained classification, plant species classification, vision transformer, deep learning, transfer learning, classification

Abstract

Automatic plant species classification is crucial for advancing education and biodiversity conserva-tion. Deep learning models, such as Vision Transformer (ViT), have demonstrated strong performance in plant species classification tasks. However, limited research explored the impact of hyperparameters in the Multi-Layer Perceptron (MLP) head of ViT models for plant-species classification. This study investi-gated the influence of learning rates, number of neurons, and activation functions on model performance. It also evaluated efficiency in both CPU and GPU environments. The objective was to determine the opti-mal configuration by analyzing accuracy, F1-score, and computation time. Two ViT models, ViT-B/16 and ViT-L/16, were tested using the VNPlant-200 dataset, which contains 200 plant species. Thirteen activa-tion functions, multiple learning rates, and neuron configurations were examined. The results showed that the Tanh activation function, combined with a learning rate of 10-4 and 1024 neurons, yielded the best performance on the ViT-B/16 model, achieving an accuracy of 0.9692 and F1-score of 0.9684. Meanwhile, the Hard Tanh activation function, with a learning rate of 10-4 and 256 neurons, delivered the best results on the ViT-L/16 model, achieving an accuracy of 0.9855 and an F1-score of 0.9854. Computational analy-sis showed that ViT-B/16 achieved an average inference time of 0.0159 seconds on a GPU and 0.8902 seconds on a CPU, while ViT-L/16 took 0.0492 seconds on a GPU and 2.8335 seconds on a CPU. These findings highlight the importance of selecting suitable activation functions, learning rates, and neuron configurations to optimize model performance while maintaining computational efficiency.

Downloads

Download data is not yet available.

Author Biography

  • Gusti Ahmad Fanshuri Alfarisy, Institut Teknologi Kalimantan, Indonesia

    Gusti Ahmad Fanshuri Alfarisy received his Ph.D. in Artificial Intelligence at the School of Digital Science, Universiti Brunei Darussalam in 2025. He received his B.C.S. and M.C.S. degrees from Brawijaya University in 2014 and 2017, respectively. He serves as a Lecturer in the Department of Informatics at Institut Teknologi Kalimantan, Indonesia. His research interests encompass open-world lifelong machine learning, deep learning, web intelligence, and ecological and environmental informatics. He has also taught various subjects, including algorithms and programming languages, data structures, numerical methods, machine learning, functional programming, deep learning, web intelligence, and software engineering.

References

[1] M. Itani, M. Al Zein, N. Nasralla, and S. N. Talhouk, ‘Biodiversity conservation in cities: Defining habitat analogues for plant species of conservation interest’, PLoS ONE, vol. 15, no. 6, p. e0220355, Jun. 2020, doi: 10.1371/journal.pone.0220355.

[2] Y. Wu, X. Feng, and G. Chen, ‘Plant Leaf Diseases Fine-Grained Categorization Using Convolutional Neural Networks’, IEEE Access, vol. 10, pp. 41087–41096, 2022, doi: 10.1109/ACCESS.2022.3167513.

[3] S. Ghosh, A. Singh, Kavita, N. Z. Jhanjhi, M. Masud, and S. Aljahdali, ‘SVM and KNN Based CNN Architectures for Plant Classification’, Computers, Materials & Continua, vol. 71, no. 3, pp. 4257–4274, 2022, doi: 10.32604/cmc.2022.023414.

[4] F. Khalid and A. A. Romle, ‘Herbal Plant Image Classification using Transfer Learning and Fine-Tuning Deep Learning Model’, vol. 35, no. 1, 2024.

[5] Z. Liu et al., ‘Swin Transformer: Hierarchical Vision Transformer using Shifted Windows’, in 2021 IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada: IEEE, Oct. 2021, pp. 9992–10002. doi: 10.1109/ICCV48922.2021.00986.

[6] H. Touvron, M. Cord, M. Douze, F. Massa, A. Sablayrolles, and H. Jégou, ‘Training data-efficient image transformers & distillation through attention’.

[7] S. Mehta and M. Rastegari, ‘MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer’, Mar. 04, 2022, arXiv: arXiv:2110.02178. doi: 10.48550/arXiv.2110.02178.

[8] G. Yang, Y. He, Y. Yang, and B. Xu, ‘Fine-Grained Image Classification for Crop Disease Based on Attention Mechanism’, Front. Plant Sci., vol. 11, p. 600854, Dec. 2020, doi: 10.3389/fpls.2020.600854.

[9] A. M. Roy, R. Bose, and J. Bhaduri, ‘A fast accurate fine-grain object detection model based on YOLOv4 deep neural network’, Oct. 30, 2021, arXiv: arXiv:2111.00298. Accessed: Oct. 11, 2024. [Online]. Available: http://arxiv.org/abs/2111.00298

[10] V. M. Araujo, A. S. Britto Jr., L. E. S. Oliveira, and A. L. Koerich, ‘Two-View Fine-grained Classification of Plant Species’, Oct. 04, 2021, arXiv: arXiv:2005.09110. Accessed: Oct. 09, 2024. [Online]. Available: http://arxiv.org/abs/2005.09110

[11] D. T. N. Nhut, T. D. Tan, T. N. Quoc, and V. T. Hoang, ‘Medicinal plant recognition based on Vision Transformer and BEiT’, Procedia Computer Science, vol. 234, pp. 188–195, 2024, doi: 10.1016/j.procs.2024.02.165.

[12] T. N. Quoc and V. T. Hoang, ‘VNPlant-200 – A Public and Large-Scale of Vietnamese Medicinal Plant Images Dataset’, in Integrated Science in Digital Age 2020, vol. 136, T. Antipova, Ed., in Lecture Notes in Networks and Systems, vol. 136, Cham: Springer International Publishing, 2021, pp. 406–411. doi: 10.1007/978-3-030-49264-9_37.

[13] T. Nguyen Quoc and V. Truong Hoang, ‘Medicinal Plant identification in the wild by using CNN’, in 2020 International Conference on Information and Communication Technology Convergence (ICTC), Jeju, Korea (South): IEEE, Oct. 2020, pp. 25–29. doi: 10.1109/ICTC49870.2020.9289480.

[14] E. D. Cubuk, B. Zoph, J. Shlens, and Q. V. Le, ‘RandAugment: Practical automated data augmentation with a reduced search space’, 2019, arXiv. doi: 10.48550/ARXIV.1909.13719.

[15] D. Chicco, N. Tötsch, and G. Jurman, ‘The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation’, BioData Mining, vol. 14, no. 1, p. 13, Feb. 2021, doi: 10.1186/s13040-021-00244-z.

[16] D. Krstinić, M. Braović, L. Šerić, and D. Božić-Štulić, ‘Multi-label Classifier Performance Evaluation with Confusion Matrix’, in Computer Science & Information Technology, AIRCC Publishing Corporation, Jun. 2020, pp. 01–14. doi: 10.5121/csit.2020.100801.

Downloads

Published

22-12-2025

Issue

Section

Articles

How to Cite

[1]
2025. Fine-Grained Plant Classification using Vision Transformers with Optimized MLP Heads. Jurnal ELTIKOM : Jurnal Teknik Elektro, Teknologi Informasi dan Komputer. 9, 2 (Dec. 2025), 130–139. DOI:https://doi.org/10.31961/eltikom.v9i2.1500.

Similar Articles

1-10 of 46

You may also start an advanced similarity search for this article.