GitXplorerGitXplorer
l

BottleneckTransformers

public
275 stars
50 forks
21 issues

Commits

List of commits on branch main.
Verified
142e965cd2d0b68f2000d576e25e5cf6139feed2

Update README.md

lleaderj1001 committed 4 years ago
Verified
ccd9de48a550c3262e68ea2cfed3035f162e9862

Update README.md

lleaderj1001 committed 4 years ago
Unverified
f494b0e915a4937d4d42c0b4044c658e71e28657

update multi-head attention

lleaderj1001 committed 4 years ago
Verified
4850d9def7263e504191a92609ec5f7ac58ceca6

Update model.py

lleaderj1001 committed 4 years ago
Verified
1ecf9f1f945f35e1ab34df83178b349c8b52a65d

Update README.md

lleaderj1001 committed 4 years ago
Verified
c1951fb8dcb22ba48833cafd29417a4692435cbd

Update model.py

lleaderj1001 committed 4 years ago

README

The README file for this repository.

Bottleneck Transformers for Visual Recognition

Update 2021/03/14

  • support Multi-head Attention

Experiments

Model heads Params (M) Acc (%)
ResNet50 baseline (ref) 23.5M 93.62
BoTNet-50 1 18.8M 95.11%
BoTNet-50 4 18.8M 95.78%
BoTNet-S1-50 1 18.8M 95.67%
BoTNet-S1-59 1 27.5M 95.98%
BoTNet-S1-77 1 44.9M wip

Summary

스크린샷 2021-01-28 오후 4 50 19

Usage (example)

  • Model
from model import Model

model = ResNet50(num_classes=1000, resolution=(224, 224))
x = torch.randn([2, 3, 224, 224])
print(model(x).size())
  • Module
from model import MHSA

resolution = 14
mhsa = MHSA(planes, width=resolution, height=resolution)

Reference

  • Paper link
  • Author: Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, Ashish Vaswani
  • Organization: UC Berkeley, Google Research