def hardnet_85(pretrained=False, return_transforms=False, **kwargs): model = HarDNet(arch=85, **kwargs) if pretrained: model = load_model(model, urls["hardnet_85"]) if return_transforms: return model, transforms else: return model
def rexnet_3_0(pretrained=False, return_transforms=False, **kwargs): model = ReXNet(width_mult=3.0, **kwargs) if pretrained: model = load_model(model, urls["rexnet_3_0"]) if return_transforms: return model, transforms else: return model
def hardnet_68_ds(pretrained=False, return_transforms=False, **kwargs): model = HarDNet(arch=68, depth_wise=True, **kwargs) if pretrained: model = load_model(model, urls["hardnet_68_ds"]) if return_transforms: return model, transforms else: return model
def swin_s(pretrained=False, return_transforms=False, **kwargs): model = SwinTransformer(depths=[2, 2, 18, 2], num_heads=[3, 6, 12, 24], **kwargs) if pretrained: model = load_model(model, urls["swin_s"]) if return_transforms: return model, transforms_224 else: return model
def swin_ti(pretrained=False, return_transforms=False, **kwargs): model = SwinTransformer(**kwargs) if pretrained: model = load_model(model, urls["swin_ti"]) if return_transforms: return model, transforms_224 else: return model
def rednet_152(pretrained=False, return_transforms=False, **kwargs): model = RedNet(BottleneckBlock, 152, **kwargs) if pretrained: model = load_model(model, urls["rednet_152"]) if return_transforms: return model, transforms else: return model
def pvt_l(pretrained=False, return_transforms=False, **kwargs): model = PyramidVisionTransformer(depths=[3, 8, 27, 3], **kwargs) if pretrained: model = load_model(model, urls["pvt_l"]) if return_transforms: return model, transforms else: return model
def swin_b(pretrained=False, return_transforms=False, **kwargs): model = SwinTransformer( embed_dim=128, depths=[2, 2, 18, 2], num_heads=[4, 8, 16, 32], **kwargs ) if pretrained: model = load_model(model, urls["swin_b"]) if return_transforms: return model, transforms_224 else: return model
def dla_34(pretrained=False, return_transforms=False, **kwargs): model = DLA(levels=(1, 1, 1, 2, 2, 1), channels=(16, 32, 64, 128, 256, 512), block=DlaBasic, **kwargs) if pretrained: model = load_model(model, urls["dla_34"]) if return_transforms: return model, transforms else: return model
def dla_60(pretrained=False, return_transforms=False, **kwargs): model = DLA(levels=(1, 1, 1, 2, 3, 1), channels=(16, 32, 128, 256, 512, 1024), block=DlaBottleneck, **kwargs) if pretrained: model = load_model(model, urls["dla_60"]) if return_transforms: return model, transforms else: return model
def mixer_l(pretrained=False, return_transforms=False, **kwargs): model = MlpMixer(hidden_dim=1024, num_blocks=24, tokens_mlp_dim=512, channels_mlp_dim=4096, **kwargs) if pretrained: model = load_model(model, urls["mixer_l"]) if return_transforms: return model, transforms else: return model
def mixer_b(pretrained=False, return_transforms=False, **kwargs): model = MlpMixer(hidden_dim=768, num_blocks=12, tokens_mlp_dim=384, channels_mlp_dim=3072, **kwargs) if pretrained: model = load_model(model, urls["mixer_b"]) if return_transforms: return model, transforms else: return model
def repvgg_a2(pretrained=False, return_transforms=False, **kwargs): model = RepVGG( num_blocks=[2, 4, 14, 1], width_multiplier=[1.5, 1.5, 1.5, 2.75], override_groups_map=None, **kwargs ) if pretrained: model = load_model(model, urls["repvgg_a2"]) if return_transforms: return model, transforms else: return model
def t2t_vit_19(pretrained=False, return_transforms=False, **kwargs): model = T2T_ViT(tokens_type="performer", embed_dim=448, depth=19, num_heads=7, mlp_ratio=3.0, **kwargs) if pretrained: model = load_model(model, urls["t2t_vit_19"]) if return_transforms: return model, transforms_224 else: return model
def t2t_vit_t_24(pretrained=False, return_transforms=False, **kwargs): model = T2T_ViT(tokens_type="transformer", embed_dim=512, depth=24, num_heads=8, mlp_ratio=3.0, **kwargs) if pretrained: model = load_model(model, urls["t2t_vit_t_24"]) if return_transforms: return model, transforms_224 else: return model
def dla_60x_c(pretrained=False, return_transforms=False, **kwargs): model = DLA(levels=(1, 1, 1, 2, 3, 1), channels=(16, 32, 64, 64, 128, 256), block=DlaBottleneck, cardinality=32, base_width=4, **kwargs) if pretrained: model = load_model(model, urls["dla_60x_c"]) if return_transforms: return model, transforms else: return model
def repvgg_b3g4(pretrained=False, return_transforms=False, **kwargs): model = RepVGG( num_blocks=[4, 6, 16, 1], width_multiplier=[3, 3, 3, 5], override_groups_map=g4_map, **kwargs ) if pretrained: model = load_model(model, urls["repvgg_b3g4"]) if return_transforms: return model, transforms else: return model
def dla_102x2(pretrained=False, return_transforms=False, **kwargs): model = DLA(levels=(1, 1, 1, 3, 4, 1), channels=(16, 32, 128, 256, 512, 1024), block=DlaBottleneck, cardinality=64, base_width=4, residual_root=True, **kwargs) if pretrained: model = load_model(model, urls["dla_102x2"]) if return_transforms: return model, transforms else: return model
def t2t_vit_14_384(pretrained=False, return_transforms=False, **kwargs): model = T2T_ViT(img_size=384, tokens_type="performer", embed_dim=384, depth=14, num_heads=6, mlp_ratio=3.0, **kwargs) if pretrained: model = load_model(model, urls["t2t_vit_14_384"]) if return_transforms: return model, transforms_384 else: return model
def cait_m_48_448(pretrained=False, return_transforms=False, **kwargs): model = CaiT(img_size=448, embed_dim=768, depth=48, num_heads=16, init_scale=1e-6, **kwargs) if pretrained: model = load_model(model, urls["cait_m_48_448"]) if return_transforms: return model, transforms_448 else: return model
def cait_m_36_384(pretrained=False, return_transforms=False, **kwargs): model = CaiT(img_size=384, embed_dim=768, depth=36, num_heads=16, init_scale=1e-6, **kwargs) if pretrained: model = load_model(model, urls["cait_m_36_384"]) if return_transforms: return model, transforms_384 else: return model
def cait_xs_24_384(pretrained=False, return_transforms=False, **kwargs): model = CaiT(img_size=384, embed_dim=288, depth=24, num_heads=6, init_scale=1e-5, **kwargs) if pretrained: model = load_model(model, urls["cait_xs_24_384"]) if return_transforms: return model, transforms_384 else: return model
def cait_xxs_36(pretrained=False, return_transforms=False, **kwargs): model = CaiT(img_size=224, embed_dim=192, depth=36, num_heads=4, init_scale=1e-5, **kwargs) if pretrained: model = load_model(model, urls["cait_xxs_36"]) if return_transforms: return model, transforms_224 else: return model
def deit_b_distilled(pretrained=False, return_transforms=False, **kwargs): model = DistilledVisionTransformer(patch_size=16, embed_dim=768, depth=12, num_heads=12, mlp_ratio=4, qkv_bias=True, epsilon=1e-6, **kwargs) if pretrained: model = load_model(model, urls["deit_b_distilled"]) if return_transforms: return model, transforms_224 else: return model
def pit_b(pretrained=False, return_transforms=False, **kwargs): model = PoolingTransformer(image_size=224, patch_size=14, stride=7, base_dims=[64, 64, 64], depth=[3, 6, 4], heads=[4, 8, 16], mlp_ratio=4, **kwargs) if pretrained: model = load_model(model, urls["pit_b"]) if return_transforms: return model, transforms else: return model
def pit_s(pretrained=False, return_transforms=False, **kwargs): model = PoolingTransformer(image_size=224, patch_size=16, stride=8, base_dims=[48, 48, 48], depth=[2, 6, 4], heads=[3, 6, 12], mlp_ratio=4, **kwargs) if pretrained: model = load_model(model, urls["pit_s"]) if return_transforms: return model, transforms else: return model
def pit_ti_distilled(pretrained=False, return_transforms=False, **kwargs): model = DistilledPoolingTransformer(image_size=224, patch_size=16, stride=8, base_dims=[32, 32, 32], depth=[2, 6, 4], heads=[2, 4, 8], mlp_ratio=4, **kwargs) if pretrained: model = load_model(model, urls["pit_ti_distilled"]) if return_transforms: return model, transforms else: return model
def swin_b_384(pretrained=False, return_transforms=False, **kwargs): model = SwinTransformer( img_size=384, embed_dim=128, depths=[2, 2, 18, 2], num_heads=[4, 8, 16, 32], window_size=12, **kwargs, ) if pretrained: model = load_model(model, urls["swin_b_384"]) if return_transforms: return model, transforms_384 else: return model
def coat_m(pretrained=False, return_transforms=False, **kwargs): model = CoaT( patch_size=4, embed_dims=[152, 216, 216, 216], serial_depths=[2, 2, 2, 2], parallel_depth=6, num_heads=8, mlp_ratios=[4, 4, 4, 4], **kwargs, ) if pretrained: model = load_model(model, urls["coat_m"]) if return_transforms: return model, transforms else: return model
def coat_lite_s(pretrained=False, return_transforms=False, **kwargs): model = CoaT( patch_size=4, embed_dims=[64, 128, 320, 512], serial_depths=[3, 4, 6, 3], parallel_depth=0, num_heads=8, mlp_ratios=[8, 8, 4, 4], **kwargs, ) if pretrained: model = load_model(model, urls["coat_lite_s"]) if return_transforms: return model, transforms else: return model