Heuristical Comparison of Vision Transformers Against Convolutional Neural Networks for Semantic Segmentation on Remote Sensing Imagery

Ashim Dahal, Saydul Akbar Murad, Nick Rahimi
11/14/2024
cs.CVcs.AI

Official code: ashimdahal/ViT-vs-CNN-Image-Segmentation (6 stars, MIT, last commit 2025-08-20).

Abstract

Vision Transformers (ViT) have recently brought a new wave of research in the field of computer vision. These models have performed particularly well in image classification and segmentation. Research on semantic and instance segmentation has accelerated with the introduction of the new architecture, with over 80% of the top 20 benchmarks for the iSAID dataset based on either the ViT architecture or the attention mechanism behind its success. This paper focuses on the heuristic comparison of three key factors of using (or not using) ViT for semantic segmentation of remote sensing aerial images on the iSAID dataset. The experimental results observed during this research were analyzed based on three objectives. First, we studied the use of a weighted fused loss function to maximize the mean Intersection over Union (mIoU) score and Dice score while minimizing entropy or class representation loss. Second, we compared transfer learning on Meta's MaskFormer, a ViT-based semantic segmentation model, against a generic UNet Convolutional Neural Network (CNN) based on mIoU, Dice scores, training efficiency, and inference time. Third, we examined the trade-offs between the two models in comparison to current state-of-the-art segmentation models. We show that the novel combined weighted loss function significantly boosts the CNN model's performance compared to transfer learning with ViT. The code for this implementation can be found at: https://github.com/ashimdahal/ViT-vs-CNN-Image-Segmentation.

View on arXivView PDF

Code Implementations(1)

MIT

Comparision of performance mass trained and fine tuned ViT with a generic CNN model using a novel combined loss function

62Python, Jupyter NotebookOct 23, 20241 years agoMIT

Similar Papers

Cite this paper

@article{dahal2024heuristical,
  title  = {Heuristical Comparison of Vision Transformers Against Convolutional Neural Networks for Semantic Segmentation on Remote Sensing Imagery},
  author = {Ashim Dahal and Saydul Akbar Murad and Nick Rahimi},
  year   = {2024},
  eprint = {2411.09101},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.09101v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.09101.svg)](https://codeofpaper.com/paper/2411.09101)

Discussion