Skip to main content

Unofficial implementations of transfomers models for vision.

Project description

VisTrans

Implementations of transformers based models for different vision tasks

Version 0.001 (03/04/2021)


Pretrained Pytorch Vision Transformer Models including following

  • vit_s16_224
  • vit_b16_224
  • vit_b16_384
  • vit_b32_384
  • vit_l16_224
  • vit_l16_384
  • vit_l32_384

Implementation based off official jax repository and timm's implementation

Install


pip install vistrans
  1. List Pretrained Models.
from vistrans import VisionTransformer
VisionTransformer.list_pretrained()
  1. Create Pretrained Models.
from vistrans import VisionTransformer
model = VisionTransformer.create_pretrained(name, img_size, in_ch, num_classes)
  1. Create Custom Model
from vistrans import VisionTransformer
model = VisionTransformer.create_model(img_size, patch_size, in_ch, num_classes,
                                       embed_dim, depth, num_heads, mlp_ratio,
                                       drop_rate, attention_drop_rate, hybrid,
                                       norm_layer, bias)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vistrans-0.0.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page