Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
120 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Collections: | ||
- Name: Vision Transformer | ||
Metadata: | ||
Architecture: | ||
- Attention Dropout | ||
- Convolution | ||
- Dense Connections | ||
- Dropout | ||
- GELU | ||
- Layer Normalization | ||
- Multi-Head Attention | ||
- Scaled Dot-Product Attention | ||
- Tanh Activation | ||
Paper: | ||
URL: https://arxiv.org/pdf/2010.11929.pdf | ||
Title: 'An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale' | ||
README: configs/swin_transformer/README.md | ||
|
||
Models: | ||
- Name: vit-base-p16_in21k-pre-3rdparty_in1k-384 | ||
In Collection: Vision Transformer | ||
Config: configs/vision_transformer/vit-base-p16_ft-evalonly_in-1k-384.py | ||
Metadata: | ||
FLOPs: 33030000000 | ||
Parameters: 86860000 | ||
Training Data: ImageNet | ||
Results: | ||
- Dataset: ImageNet | ||
Task: Image Classification | ||
Metrics: | ||
Top 1 Accuracy: 85.43 | ||
Top 5 Accuracy: 97.77 | ||
Weights: https://download.openmmlab.com/mmclassification/v0/vit/finetune/vit-base-p16_in21k-pre-3rdparty_in1k-384_20210819-65c4bf44.pth | ||
Converted From: | ||
Weights: https://console.cloud.google.com/storage/browser/_details/vit_models/augreg/B_16-i21k-300ep-lr_0.001-aug_medium1-wd_0.1-do_0.0-sd_0.0--imagenet2012-steps_20k-lr_0.03-res_384.npz | ||
Code: https://github.com/google-research/vision_transformer/blob/88a52f8892c80c10de99194990a517b4d80485fd/vit_jax/models.py#L208 | ||
- Name: vit-base-p32_in21k-pre-3rdparty_in1k-384 | ||
In Collection: Vision Transformer | ||
Config: configs/vision_transformer/vit-base-p32_ft-evalonly_in-1k-384.py | ||
Metadata: | ||
FLOPs: 8560000000 | ||
Parameters: 88300000 | ||
Training Data: ImageNet | ||
Results: | ||
- Dataset: ImageNet | ||
Task: Image Classification | ||
Metrics: | ||
Top 1 Accuracy: 84.01 | ||
Top 5 Accuracy: 97.08 | ||
Weights: https://download.openmmlab.com/mmclassification/v0/vit/finetune/vit-base-p32_in21k-pre-3rdparty_in1k-384_20210819-a56f8886.pth | ||
Converted From: | ||
Weights: https://console.cloud.google.com/storage/browser/_details/vit_models/augreg/B_32-i21k-300ep-lr_0.001-aug_light1-wd_0.1-do_0.0-sd_0.0--imagenet2012-steps_20k-lr_0.01-res_384.npz | ||
Code: https://github.com/google-research/vision_transformer/blob/88a52f8892c80c10de99194990a517b4d80485fd/vit_jax/models.py#L208 | ||
- Name: vit-large-p16_in21k-pre-3rdparty_in1k-384 | ||
In Collection: Vision Transformer | ||
Config: configs/vision_transformer/vit-large-p16_ft-evalonly_in-1k-384.py | ||
Metadata: | ||
FLOPs: 116680000000 | ||
Parameters: 304720000 | ||
Training Data: ImageNet | ||
Results: | ||
- Dataset: ImageNet | ||
Task: Image Classification | ||
Metrics: | ||
Top 1 Accuracy: 85.63 | ||
Top 5 Accuracy: 97.63 | ||
Weights: https://download.openmmlab.com/mmclassification/v0/vit/finetune/vit-large-p16_in21k-pre-3rdparty_in1k-384_20210819-0bb8550c.pth | ||
Converted From: | ||
Weights: https://console.cloud.google.com/storage/browser/_details/vit_models/augreg/L_16-i21k-300ep-lr_0.001-aug_strong1-wd_0.1-do_0.0-sd_0.0--imagenet2012-steps_20k-lr_0.01-res_384.npz | ||
Code: https://github.com/google-research/vision_transformer/blob/88a52f8892c80c10de99194990a517b4d80485fd/vit_jax/models.py#L208 |
34 changes: 34 additions & 0 deletions
34
configs/vision_transformer/vit-large-p32_ft-evalonly_in-1k-384.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Refer to pytorch-image-models | ||
_base_ = [ | ||
'../_base_/models/vit-large-p32.py', | ||
'../_base_/datasets/imagenet_bs32_pil_resize.py', | ||
'../_base_/schedules/imagenet_bs256_epochstep.py', | ||
'../_base_/default_runtime.py' | ||
] | ||
|
||
model = dict(backbone=dict(img_size=384)) | ||
|
||
img_norm_cfg = dict( | ||
mean=[127.5, 127.5, 127.5], std=[127.5, 127.5, 127.5], to_rgb=True) | ||
|
||
train_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='RandomResizedCrop', size=384, backend='pillow'), | ||
dict(type='RandomFlip', flip_prob=0.5, direction='horizontal'), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='ToTensor', keys=['gt_label']), | ||
dict(type='Collect', keys=['img', 'gt_label']) | ||
] | ||
|
||
test_pipeline = [ | ||
dict(type='LoadImageFromFile'), | ||
dict(type='Resize', size=(384, -1), backend='pillow'), | ||
dict(type='CenterCrop', crop_size=384), | ||
dict(type='Normalize', **img_norm_cfg), | ||
dict(type='ImageToTensor', keys=['img']), | ||
dict(type='Collect', keys=['img']) | ||
] | ||
|
||
data = dict( | ||
train=dict(pipeline=train_pipeline), test=dict(pipeline=test_pipeline)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters