All models

botnet26t_256

A ResNet whose last three bottleneck blocks use global self-attention instead of spatial convolutions.

Image classification · 303 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
botnet
Parameters
12.5M
Operations
303
Framework
PyTorch
Recurrent
No
Published
CVPR (arXiv 2021)
Cited by
1,290 (as of 9 October 2026)
Authors
Aravind Srinivas, Tsung-Yi Lin, Niki Parmar and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3711
Graph hash
031b13a3c15c4f564452fe472289fe09cf3544edbab4282bdb22779d20efda68
Skeleton hash
d1ff8b2cc32fdb8b543c88b78d7a653ac4d2cf647a500824e5552e21b23c7cd5
Architecture hash
8d66f4aef995781cd5c38595a4f025dfe14116181028b207bba8c08152c00846
Diagram SHA-256
44230e8eb86d2a7001c8f510531eabc5ea7155aa52122320799a9d15bb070668
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

timm.create_model('botnet26t_256', pretrained=False)

What it is

About this model's family

BoTNet is a backbone that swaps the spatial convolutions in the last three bottleneck blocks of a ResNet for global self-attention, and changes nothing else. The authors describe it as a conceptually simple yet powerful backbone architecture that incorporates self-attention for multiple computer vision tasks including image classification, object detection and instance segmentation. The paper also points out that ResNet bottleneck blocks with self-attention can be viewed as Transformer blocks.

On COCO instance segmentation with the Mask R-CNN framework, BoTNet reaches 44.4% Mask AP and 49.7% Box AP, surpassing the previously best published single-model, single-scale results of ResNeSt on the validation set. The members traced here are its image-classification form, which the paper presents as a simple adaptation of the BoTNet design. Those classification models reach 84.7% top-1 accuracy on ImageNet while being up to 1.64x faster in compute time than EfficientNet models on TPU-v3 hardware.

The authors offer it as a strong baseline for future research in self-attention models for vision.

Key idea. Replacing the spatial convolutions in the final three bottleneck blocks of a ResNet with global self-attention, with no other changes, improves instance segmentation and detection while reducing parameters.

  • botnet
  • bottleneck transformer
  • bottleneck transformers for visual recognition
  • botnet26t_256
  • botnet50ts_256
  • timm
  • image classification
  • self-attention backbone

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{srinivas2021bottlenecktransformersvisualrecognition,
      title={Bottleneck Transformers for Visual Recognition}, 
      author={Aravind Srinivas and Tsung-Yi Lin and Niki Parmar and Jonathon Shlens and Pieter Abbeel and Ashish Vaswani},
      year={2021},
      eprint={2101.11605},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2101.11605}, 
}