All models

botnet50ts_256

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

Image classification · 535 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 (19 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
22.7M
Operations
535
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
m3712
Graph hash
47537636d70a5d25ebc210caf14d3b5ba9fe4b77e6b6ee6b5e5b0e132b50cb5f
Skeleton hash
6098570d89e085cb697f9360306869d9bf9028c03b6e19123822d6b007dbaf40
Architecture hash
8635997c8902cde1ebac8a9bf4c0482b54181cc7c24f6f8bc55d98a314b1707a
Diagram SHA-256
e6d221820ff4dd23670fee3e5bf7c0dfef779a64d5d7e5ed9ecb907b1474a103
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('botnet50ts_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}, 
}