Applied Sciences (Apr 2023)

Comparing Vision Transformers and Convolutional Neural Networks for Image Classification: A Literature Review

  • José Maurício,
  • Inês Domingues,
  • Jorge Bernardino

DOI
https://doi.org/10.3390/app13095521
Journal volume & issue
Vol. 13, no. 9
p. 5521

Abstract

Read online

Transformers are models that implement a mechanism of self-attention, individually weighting the importance of each part of the input data. Their use in image classification tasks is still somewhat limited since researchers have so far chosen Convolutional Neural Networks for image classification and transformers were more targeted to Natural Language Processing (NLP) tasks. Therefore, this paper presents a literature review that shows the differences between Vision Transformers (ViT) and Convolutional Neural Networks. The state of the art that used the two architectures for image classification was reviewed and an attempt was made to understand what factors may influence the performance of the two deep learning architectures based on the datasets used, image size, number of target classes (for the classification problems), hardware, and evaluated architectures and top results. The objective of this work is to identify which of the architectures is the best for image classification and under what conditions. This paper also describes the importance of the Multi-Head Attention mechanism for improving the performance of ViT in image classification.

Keywords