This study evaluates the performance of a Vision Transformer (ViT) as a feature extractor for classifying grapevine leaf images into five classes, using four conventional classifiers: Multi-Layer Perceptron (MLP), K-Nearest Neighbors (KNN), Support Vector Classifier (SVC), and Random Forest. The dataset was split 80% for training and 20% for testing, preserving class proportions. Results showed that MLP and Random Forest achieved a training accuracy of 1.00, while SVC reached 0.97 and KNN 0.91. On the test set, SVC and MLP maintained the best balance between fit and generalization, with accuracy of 0.86 and 0.93, respectively; both attained average precision, recall, and F1-score above 0.85. By contrast, Random Forest and KNN exhibited greater performance degradation, with accuracies of 0.83 and 0.74, respectively. These findings indicate that, although the ViT provides a robust and consistent feature space, classifier selection remains a key factor for optimizing predictive performance and ensuring model stability on unseen data.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Comparative Analysis of Vision Transformer (ViT) and Traditional Machine Learning Models for the Automatic Classification of Grape Varieties

  • Julián Coronel-Reyes,
  • Johnny Javier Triviño Sanchez,
  • Hamilton Villamar-Barros,
  • Rodrigo Sánchez-Fernández,
  • Alexander Fernando Haro Sarango

摘要

This study evaluates the performance of a Vision Transformer (ViT) as a feature extractor for classifying grapevine leaf images into five classes, using four conventional classifiers: Multi-Layer Perceptron (MLP), K-Nearest Neighbors (KNN), Support Vector Classifier (SVC), and Random Forest. The dataset was split 80% for training and 20% for testing, preserving class proportions. Results showed that MLP and Random Forest achieved a training accuracy of 1.00, while SVC reached 0.97 and KNN 0.91. On the test set, SVC and MLP maintained the best balance between fit and generalization, with accuracy of 0.86 and 0.93, respectively; both attained average precision, recall, and F1-score above 0.85. By contrast, Random Forest and KNN exhibited greater performance degradation, with accuracies of 0.83 and 0.74, respectively. These findings indicate that, although the ViT provides a robust and consistent feature space, classifier selection remains a key factor for optimizing predictive performance and ensuring model stability on unseen data.