Skip to content

Implementation of CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification

License

Notifications You must be signed in to change notification settings

rishikksh20/CrossViT-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrossViT : Cross-Attention Multi-Scale Vision Transformer for Image Classification

This is an unofficial PyTorch implementation of CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification .

Usage :

import torch
from crossvit import CrossViT

img = torch.ones([1, 3, 224, 224])
    
model = CrossViT(image_size = 224, channels = 3, num_classes = 100)
out = model(img)

print("Shape of out :", out.shape)      # [B, num_classes]

Citation

@misc{chen2021crossvit,
      title={CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification}, 
      author={Chun-Fu Chen and Quanfu Fan and Rameswar Panda},
      year={2021},
      eprint={2103.14899},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Acknowledgement

About

Implementation of CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages