https://github.com/lucidrains/uniformer-pytorch
Implementation of Uniformer, a simple attention and 3d convolutional net that achieved SOTA in a number of video classification tasks, debuted in ICLR 2022
https://github.com/lucidrains/uniformer-pytorch
3d-convolutional-network artificial-intelligence attention-mechanism deep-learning transformers video-classification
Last synced: about 2 months ago
JSON representation
Implementation of Uniformer, a simple attention and 3d convolutional net that achieved SOTA in a number of video classification tasks, debuted in ICLR 2022
- Host: GitHub
- URL: https://github.com/lucidrains/uniformer-pytorch
- Owner: lucidrains
- License: mit
- Created: 2021-11-13T19:53:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-22T02:31:21.000Z (about 3 years ago)
- Last Synced: 2025-03-27T17:35:47.201Z (2 months ago)
- Topics: 3d-convolutional-network, artificial-intelligence, attention-mechanism, deep-learning, transformers, video-classification
- Language: Python
- Homepage:
- Size: 443 KB
- Stars: 99
- Watchers: 6
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Uniformer - Pytorch
Implementation of Uniformer, a simple attention and 3d convolutional net that achieved SOTA in a number of video classification tasks
## Install
```bash
$ pip install uniformer-pytorch
```## Usage
Uniformer-S
```python
import torch
from uniformer_pytorch import Uniformermodel = Uniformer(
num_classes = 1000, # number of output classes
dims = (64, 128, 256, 512), # feature dimensions per stage (4 stages)
depths = (3, 4, 8, 3), # depth at each stage
mhsa_types = ('l', 'l', 'g', 'g') # aggregation type at each stage, 'l' stands for local, 'g' stands for global
)video = torch.randn(1, 3, 8, 224, 224) # (batch, channels, time, height, width)
logits = model(video) # (1, 1000)
```Uniformer-B
```python
import torch
from uniformer_pytorch import Uniformermodel = Uniformer(
num_classes = 1000
depths = (5, 8, 20, 7)
)
```## Citations
```bibtex
@inproceedings{anonymous2022uniformer,
title = {UniFormer: Unified Transformer for Efficient Spatial-Temporal Representation Learning},
author = {Anonymous},
booktitle = {Submitted to The Tenth International Conference on Learning Representations },
year = {2022},
url = {https://openreview.net/forum?id=nBU_u6DLvoK},
note = {under review}
}
```