Comparing attention, CNNs, and SSMs for multi-domain image recognition
Abstract
Multi-domain image recognition presents a rich and challenging area for computer vision research, with applications ranging from natural disaster detection to medical and agricultural diagnostics and beyond. However, deploying such detection systems in resource-constrained environments has become increasingly challenging due to the advent of the Transformer and other Deep Neural Network (DNN) architectures, which require substantial VRAM and other computational resources for inference on edge devices. As state-of-the-art image classification models grow in size and compute requirements, the search for more resource-efficient alternatives has gained momentum. State-space models (SSMs) have recently emerged as a promising alternative to the much-coveted Transformer-Attention architecture. While these new-generation SSM models have shown promising results in Natural Language tasks, their potential for vision tasks remains underexplored. In this study, we conduct a comparative, performance-focused study of the leading SSM-based vision backbone, Vision Mamba (ViM), against prominent vision backbone models, including CNN and Transformer-based models. We evaluate their performance across three diverse tasks: wildfire detection, plant disease identification, and skin cancer diagnosis. Our results highlight that while CNN-based models consistently achieved higher accuracy, ViM models maintain a lower memory footprint. Moreover, the ViM Tiny model (7.06M params) matched the accuracy of the 12x larger DeiT Base model (85.80M params) in the most challenging of the three tasks, namely, the wildfire detection task. In addition, when distilled from a larger pre-trained and fine-tuned model, ViM-Tiny produced an accuracy score of 85.32%, up from 70.6%, in the wildfire detection task, closely matching the best-performing model in our study while maintaining a fraction of its memory footprint. These findings underscore the potential for Mamba-based vision backbones for producing lightweight and reliable models for deployment in resource-constrained environments.
// Source
Authors: Amitabha Chakrabarty, Mondrita Biswas, Sayeedur Rahman, Syeda Farhat Tarannum, Dipro Nishanto, Fahim Ul Islam, Siti Sarah Maidin, Halimaton Hakimi
Institutions: INTI International University, Universiti Teknologi Petronas, BRAC University, O. P. Jindal Global University