|
|
|
@ -60,6 +60,15 @@ default_cfgs = dict(
|
|
|
|
|
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-vitjx/jx_mixer_l16_224_in21k-846aa33c.pth',
|
|
|
|
|
num_classes=21843
|
|
|
|
|
),
|
|
|
|
|
# Mixer ImageNet-21K-P pretraining
|
|
|
|
|
mixer_b16_224_miil_in21k=_cfg(
|
|
|
|
|
url='https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/mixer_b16_224_miil_in21k.pth',
|
|
|
|
|
mean=(0, 0, 0), std=(1, 1, 1), crop_pct=0.875, interpolation='bilinear', num_classes=11221,
|
|
|
|
|
),
|
|
|
|
|
mixer_b16_224_miil=_cfg(
|
|
|
|
|
url='https://miil-public-eu.oss-eu-central-1.aliyuncs.com/model-zoo/ImageNet_21K_P/models/timm/mixer_b16_224_miil.pth',
|
|
|
|
|
mean=(0, 0, 0), std=(1, 1, 1), crop_pct=0.875, interpolation='bilinear',
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -255,3 +264,21 @@ def mixer_l16_224_in21k(pretrained=False, **kwargs):
|
|
|
|
|
model_args = dict(patch_size=16, num_blocks=24, hidden_dim=1024, tokens_dim=512, channels_dim=4096, **kwargs)
|
|
|
|
|
model = _create_mixer('mixer_l16_224_in21k', pretrained=pretrained, **model_args)
|
|
|
|
|
return model
|
|
|
|
|
|
|
|
|
|
@register_model
|
|
|
|
|
def mixer_b16_224_miil(pretrained=False, **kwargs):
|
|
|
|
|
""" Mixer-B/16 224x224. ImageNet-21k pretrained weights.
|
|
|
|
|
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
|
|
|
|
|
"""
|
|
|
|
|
model_args = dict(patch_size=16, num_blocks=12, hidden_dim=768, tokens_dim=384, channels_dim=3072, **kwargs)
|
|
|
|
|
model = _create_mixer('mixer_b16_224_miil', pretrained=pretrained, **model_args)
|
|
|
|
|
return model
|
|
|
|
|
|
|
|
|
|
@register_model
|
|
|
|
|
def mixer_b16_224_miil_in21k(pretrained=False, **kwargs):
|
|
|
|
|
""" Mixer-B/16 224x224. ImageNet-1k pretrained weights.
|
|
|
|
|
Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
|
|
|
|
|
"""
|
|
|
|
|
model_args = dict(patch_size=16, num_blocks=12, hidden_dim=768, tokens_dim=384, channels_dim=3072, **kwargs)
|
|
|
|
|
model = _create_mixer('mixer_b16_224_miil_in21k', pretrained=pretrained, **model_args)
|
|
|
|
|
return model
|