https://github.com/lucasjinreal/efficientformers
Collection of efficient transformers.
https://github.com/lucasjinreal/efficientformers
backbone efficient efficient-transformer efficienttransformer object-detection transformer
Last synced: 7 months ago
JSON representation
Collection of efficient transformers.
- Host: GitHub
- URL: https://github.com/lucasjinreal/efficientformers
- Owner: lucasjinreal
- Created: 2022-09-20T12:18:52.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-31T02:44:10.000Z (over 3 years ago)
- Last Synced: 2025-06-11T15:09:04.646Z (8 months ago)
- Topics: backbone, efficient, efficient-transformer, efficienttransformer, object-detection, transformer
- Language: Python
- Homepage:
- Size: 10.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EfficientFormers
**EfficientFormers** is a library which contains some SOTA efficient transformer architectures. Be note that, effcientformers only index **light-weighted and fast** transformer models.
Currently supported models:
- [efficientformer - 2022](https://github.com/snap-research/EfficientFormer);
- [Edge Vit - ECCV2022](https://arxiv.org/pdf/2205.03436.pdf);
will add:
- [EcoFormer - 2022](https://github.com/ziplab/EcoFormer);
Please star and fork! Contribution are very welcomed.
## Install
```
pip install efficientformers
```
## Usage
```python
from efficientformers.cv.efficientformer import efficientformer_l1
import torch
x = torch.randn([1, 3, 224, 224])
a = efficientformer_l1(num_classes=10, distillation=False)
o = a(x)
print(o.shape)
# EdgeVit
from efficientformers.cv.edgevit import edgevit_xs
model = edgevit_xs()
```