# LowFormer

**Category:** Efficient/Mobile · **Code:**
[`timm/models/lowformer.py`](https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/lowformer.py) ·
**Architectures:** 8 · **Pretrained weights:** 7 (0 with ImageNet-1k results)

LowFormer is a convolutional transformer backbone designed for hardware efficiency (measured throughput and latency
rather than MACs). The E1 / E2 / E3 edge GPU variants are from the journal extension.

## Papers

* [LowFormer: Hardware Efficient Design for Convolutional Transformer Backbones](https://arxiv.org/abs/2409.03460)
* [Beyond MACs: Hardware Efficient Architecture Design for Vision Backbones](https://arxiv.org/abs/2603.26551)

## Usage

See the [Quickstart](../quickstart) for loading pretrained weights, image preprocessing and fine-tuning, and [Feature
Extraction](../feature_extraction) for using the models as backbones.

```py
>>> import timm
>>> model = timm.create_model('lowformer_b0.in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)
```

## Model API support

| Feature | `LowFormer` |
|---|---|
| [`features_only=True` feature maps](../model_api#intermediate-features) | ✓ (strides 4, 8, 16, 32) |
| [`forward_intermediates()`](../model_api#intermediate-features) | ✓ |
| [`prune_intermediate_layers()`](../model_api#intermediate-features) | ✓ |
| [Any input size, no changes needed](../model_api#input-size) | ✓ |
| [`set_input_size()`](../model_api#input-size) | – |
| [`dynamic_img_size=True`](../model_api#input-size) | – |
| [`set_grad_checkpointing()`](../model_api#training-hooks) | ✓ |
| [Layer-wise LR decay (`group_matcher()`)](../model_api#training-hooks) | ✓ |
| [`reset_classifier()`](../model_api#classifier) | ✓ |

✓ supported, ✓ (square) works for square sizes only, ✗ not supported, – not needed (the model already accepts any input
size). Checked by running each feature on a randomly initialized model (`LowFormer` with `lowformer_b0` at 224), other
architectures of the same class are expected to behave the same. See the [Model API](../model_api) page for details.

## Architectures

| Architecture | Params (M) | GMACs | Input size | Pretrained weights |
|---|---:|---:|---:|---:|
| `lowformer_b0` | 14.10 | - | 224 | 1 |
| `lowformer_b1` | 17.94 | - | 224 | 1 |
| `lowformer_b2` | 44.99 | - | 224 | 0 |
| `lowformer_b3` | 57.09 | - | 224 | 1 |
| `lowformer_b15` | 33.98 | - | 224 | 1 |
| `lowformer_e1` | 18.90 | - | 224 | 1 |
| `lowformer_e2` | 22.75 | - | 224 | 1 |
| `lowformer_e3` | 41.32 | - | 224 | 1 |

GMACs and parameter counts are for the default input size and classifier of each architecture, from the [benchmark
results](https://github.com/huggingface/pytorch-image-models/tree/main/results).

## Pretrained weights

Top-1 is ImageNet-1k validation accuracy from
[`results-imagenet.csv`](https://github.com/huggingface/pytorch-image-models/blob/main/results/results-imagenet.csv) at
the listed eval size, - if the weight has no ImageNet-1k result (e.g. pretraining or image-text weights). Classes is the
size of the pretrained classifier, none for weights without one.

| Weight | Input size | Top-1 (%) | Eval size | Classes | License | Hub |
|---|---:|---:|---:|---:|---|---|
| `lowformer_b0.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_b0.in1k) |
| `lowformer_b1.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_b1.in1k) |
| `lowformer_b3.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_b3.in1k) |
| `lowformer_b15.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_b15.in1k) |
| `lowformer_e1.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_e1.in1k) |
| `lowformer_e2.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_e2.in1k) |
| `lowformer_e3.in1k` | 224 | - | - | 1000 | apache-2.0 | [timm](https://huggingface.co/timm/lowformer_e3.in1k) |

## Citation

```bibtex
@article{Nottebaum2024LowFormerHE,
  title={LowFormer: Hardware Efficient Design for Convolutional Transformer Backbones},
  author={Moritz Nottebaum and Matteo Dunnhofer and Christian Micheloni},
  journal={2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
  year={2024},
  pages={7008-7018},
}

@article{Nottebaum2026BeyondMACs,
  author  = {Nottebaum, Moritz and Dunnhofer, Matteo and Micheloni, Christian},
  title   = {Beyond {MAC}s: Hardware Efficient Architecture Design for Vision Backbones},
  journal = {International Journal of Computer Vision},
  year    = {2026},
  volume  = {134},
  number  = {6},
  pages   = {295},
  doi     = {10.1007/s11263-026-02873-5},
  url     = {https://doi.org/10.1007/s11263-026-02873-5}
}
```

