Fine-Grained Plant Classification using Vision Transformers with Optimized MLP Heads
DOI:
https://doi.org/10.31961/eltikom.v9i2.1500Keywords:
fine-grained classification, plant species classification, vision transformer, deep learning, transfer learning, classificationAbstract
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
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
Issue
Section
License
Copyright (c) 2025 Koko Yuardi, Gusti Ahmad Fanshuri Alfarisy, Ramadhan Paninggalih

This work is licensed under a Creative Commons Attribution 4.0 International License.
All accepted papers will be published under a Creative Commons Attribution 4.0 International (CC BY 4.0) License. Authors retain copyright and grant the journal right of first publication. CC-BY Licenced means lets others to Share (copy and redistribute the material in any medium or format) and Adapt (remix, transform, and build upon the material for any purpose, even commercially).

