HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Sequencer: Deep LSTM for Image Classification

Yuki Tatsunami Masato Taki

Sequencer: Deep LSTM for Image Classification

Abstract

In recent computer vision research, the advent of the Vision Transformer (ViT) has rapidly revolutionized various architectural design efforts: ViT achieved state-of-the-art image classification performance using self-attention found in natural language processing, and MLP-Mixer achieved competitive performance using simple multi-layer perceptrons. In contrast, several studies have also suggested that carefully redesigned convolutional neural networks (CNNs) can achieve advanced performance comparable to ViT without resorting to these new ideas. Against this background, there is growing interest in what inductive bias is suitable for computer vision. Here we propose Sequencer, a novel and competitive architecture alternative to ViT that provides a new perspective on these issues. Unlike ViTs, Sequencer models long-range dependencies using LSTMs rather than self-attention layers. We also propose a two-dimensional version of Sequencer module, where an LSTM is decomposed into vertical and horizontal LSTMs to enhance performance. Despite its simplicity, several experiments demonstrate that Sequencer performs impressively well: Sequencer2D-L, with 54M parameters, realizes 84.6% top-1 accuracy on only ImageNet-1K. Not only that, we show that it has good transferability and the robust resolution adaptability on double resolution-band.

Code Repositories

rwightman/pytorch-image-models
Official
pytorch
Mentioned in GitHub
liuruiyang98/Jittor-MLP
jax
Mentioned in GitHub
timeseriesAI/tsai
pytorch
Mentioned in GitHub
okojoalg/sequencer
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
domain-generalization-on-imagenet-aSequencer2D-L
Top-1 accuracy %: 35.5
domain-generalization-on-imagenet-cSequencer2D-L
mean Corruption Error (mCE): 48.9
domain-generalization-on-imagenet-rSequencer2D-L
Top-1 Error Rate: 51.9
domain-generalization-on-imagenet-sketchSequencer2D-L
Top-1 accuracy: 35.8
image-classification-on-imagenetSequencer2D-S
GFLOPs: 8.4
Number of params: 28M
Top 1 Accuracy: 82.3%
image-classification-on-imagenetSequencer2D-L
GFLOPs: 16.6
Number of params: 54M
Top 1 Accuracy: 83.4%
image-classification-on-imagenetSequencer2D-M
GFLOPs: 11.1
Number of params: 38M
Top 1 Accuracy: 82.8%
image-classification-on-imagenetSequencer2D-L↑392
GFLOPs: 50.7
Number of params: 54M
Top 1 Accuracy: 84.6%
image-classification-on-imagenet-realSequencer2D-L
Accuracy: 87.9
image-classification-on-imagenet-v2Sequencer2D-L
Top 1 Accuracy: 73.4

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp