EUVIMEDEUVIMED entdecken
Open Access · CC BY-SA 4.0

A Comparative Study of Convolutional Neural Networks and Vision Transformers for Fruit Classification

Malik Jawarneh, Arief Marwanto, Dedy Syamsuar, Maivi Kusnandar

International Journal of Advances in Artificial Intelligence and Machine Learning · 23.07.2025 · 2 (2) · 104-112

DOI: 10.58723/ijaaiml.v2i2.435 ↗

Kurz gefasst

Fachartikel in der Zeitschrift International Journal of Advances in Artificial Intelligence and Machine Learning, online erschienen am 23.07.2025. Verfasst von Malik Jawarneh und 3 weiteren Autor:innen. Die Arbeit wurde bisher 3-mal zitiert (Crossref). Der Volltext ist frei zugänglich (Open Access, CC BY-SA 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Background of study: Accurate fruit classification is vital for agricultural automation, yet traditional methods are often subjective and inefficient. Convolutional Neural Networks (CNNs) are effective but struggle with global context in fine-grained tasks. Vision Transformers (ViTs), inspired by NLP models, offer global attention mechanisms that may improve classification in complex scenarios.Aims and scope of paper: This study compares the performance of EfficientNet-B0 (a CNN model) and ViT-B/16 (a Transformer model) on a fruit classification task involving five fruit types. The goal is to evaluate their strengths and weaknesses under controlled experimental conditions using a moderately sized dataset.

Methods

A dataset of 10,000 fruit images was preprocessed with standard augmentation techniques and split into training and validation sets. Both models were fine-tuned using pretrained weights. Performance was evaluated using accuracy, precision, recall, F1-score, and confusion matrices.

Result

EfficientNet-B0 achieved higher overall accuracy (94%) than ViT-B/16 (92%). The CNN model performed consistently across all classes, particularly excelling in bananas and strawberries. ViT-B/16 showed superior results for strawberries but struggled with apples. Confusion matrices revealed class-specific strengths and weaknesses.

Conclusion

EfficientNet-B0 is better suited for general fruit classification due to its balanced performance, while ViT-B/16 excels in capturing fine-grained visual features. A hybrid approach may leverage both models’ strengths for enhanced performance in real-world applications.

Zitieren

APA

Jawarneh, M., Marwanto, A., Syamsuar, D., & Kusnandar, M. (2025). A Comparative Study of Convolutional Neural Networks and Vision Transformers for Fruit Classification. International Journal of Advances in Artificial Intelligence and Machine Learning, 2(2), 104-112. https://doi.org/10.58723/ijaaiml.v2i2.435

Vancouver

Jawarneh M, Marwanto A, Syamsuar D, Kusnandar M. A Comparative Study of Convolutional Neural Networks and Vision Transformers for Fruit Classification. International Journal of Advances in Artificial Intelligence and Machine Learning. 2025;2(2):104-112. doi:10.58723/ijaaiml.v2i2.435

BibTeX
@article{Jawarneh2025,
  author = {Jawarneh, Malik and Marwanto, Arief and Syamsuar, Dedy and Kusnandar, Maivi},
  title = {A Comparative Study of Convolutional Neural Networks and Vision Transformers for Fruit Classification},
  journal = {International Journal of Advances in Artificial Intelligence and Machine Learning},
  year = {2025},
  volume = {2},
  number = {2},
  pages = {104--112},
  doi = {10.58723/ijaaiml.v2i2.435}
}
Kostenlos starten →