flowvision.models¶
Pretrain Models for Visual Tasks
Classification¶
The models subpackage contains definitions for the following model architectures for image classification:
Alexnet¶
-
flowvision.models.alexnet(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.alexnet.AlexNet[source]¶ Constructs the AlexNet model.
Note
AlexNet model architecture from the One weird trick… paper. The required minimum input size of this model is 63x63.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> alexnet = flowvision.models.alexnet(pretrained=False, progress=True)
SqueezeNet¶
-
flowvision.models.squeezenet1_0(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.squeezenet.SqueezeNet[source]¶ Constructs the SqueezeNet model.
Note
SqueezeNet model from the SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> squeezenet1_0 = flowvision.models.squeezenet1_0(pretrained=False, progress=True)
-
flowvision.models.squeezenet1_1(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.squeezenet.SqueezeNet[source]¶ Constructs the SqueezeNet 1.1 model.
Note
SqueezeNet 1.1 model from the SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and <0.5MB model size paper. Note that SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters than SqueezeNet 1.0, without sacrificing accuracy.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> squeezenet1_1 = flowvision.models.squeezenet1_1(pretrained=False, progress=True)
VGG¶
-
flowvision.models.vgg11(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-11 model (configuration “A”).
Note
VGG 11-layer model (configuration “A”) from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg11 = flowvision.models.vgg11(pretrained=False, progress=True)
-
flowvision.models.vgg11_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-11 model with batch normalization (configuration “A”).
Note
VGG 11-layer model (configuration “A”) with batch normalization “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg11_bn = flowvision.models.vgg11_bn(pretrained=False, progress=True)
-
flowvision.models.vgg13(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-13 model (configuration “B”).
Note
VGG 13-layer model (configuration “B”) from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg13 = flowvision.models.vgg13(pretrained=False, progress=True)
-
flowvision.models.vgg13_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-13 model with batch normalization (configuration “B”).
Note
VGG 13-layer model (configuration “B”) with batch normalization from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg13_bn = flowvision.models.vgg13_bn(pretrained=False, progress=True)
-
flowvision.models.vgg16(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-16 model (configuration “D”).
Note
VGG 16-layer model (configuration “D”) from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg16 = flowvision.models.vgg16(pretrained=False, progress=True)
-
flowvision.models.vgg16_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-16 model (configuration “D”) with batch normalization.
Note
VGG 16-layer model (configuration “D”) with batch normalization from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg16_bn = flowvision.models.vgg16_bn(pretrained=False, progress=True)
-
flowvision.models.vgg19(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-19 model (configuration “E”).
Note
VGG 19-layer model (configuration “E”) from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg19 = flowvision.models.vgg19(pretrained=False, progress=True)
-
flowvision.models.vgg19_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.vgg.VGG[source]¶ Constructs the VGG-19 model (configuration “E”) with batch normalization.
Note
VGG 19-layer model (configuration “E”) with batch normalization from “Very Deep Convolutional Networks For Large-Scale Image Recognition”. The required minimum input size of the model is 32x32.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vgg19_bn = flowvision.models.vgg19_bn(pretrained=False, progress=True)
GoogLeNet¶
-
flowvision.models.googlenet(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.googlenet.GoogLeNet[source]¶ Constructs the GoogLeNet (Inception v1) model.
Note
GoogLeNet (Inception v1) model from the Going Deeper with Convolutions paper. The required minimum input size of the model is 15x15.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
Trueaux_logits (bool) – If True, adds two auxiliary branches that can improve training. Default:
Falsewhen pretrained is True otherwiseTruetransform_input (bool) – If True, preprocesses the input according to the method with which it was trained on ImageNet. Default:
False
For example:
>>> import flowvision >>> googlenet = flowvision.models.googlenet(pretrained=False, progress=True)
InceptionV3¶
-
flowvision.models.inception_v3(pretrained: bool = False, progress: bool = True, **kwargs: Any)[source]¶ Constructs Inception v3 model.
Note
Inception v3 model from the Rethinking the Inception Architecture for Computer Vision paper. In contrast to the other models the inception_v3 expects tensors with a size of N x 3 x 299 x 299, so ensure your images are sized accordingly.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
Trueaux_logits (bool) – If True, add an auxiliary branch that can improve training. Default:
Truetransform_input (bool) – If True, preprocesses the input according to the method with which it was trained on ImageNet. Default:
False
For example:
>>> import flowvision >>> inception_v3 = flowvision.models.inception_v3(pretrained=False, progress=True)
ResNet¶
-
flowvision.models.resnet101(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNet-101 model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnet101 = flowvision.models.resnet101(pretrained=False, progress=True)
-
flowvision.models.resnet152(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNet-152 model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnet152 = flowvision.models.resnet152(pretrained=False, progress=True)
-
flowvision.models.resnet18(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNet-18 model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnet18 = flowvision.models.resnet18(pretrained=False, progress=True)
-
flowvision.models.resnet34(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNet-34 model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnet34 = flowvision.models.resnet34(pretrained=False, progress=True)
-
flowvision.models.resnet50(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNet-50 model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnet50 = flowvision.models.resnet50(pretrained=False, progress=True)
-
flowvision.models.resnext101_32x8d(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNeXt-101 32x8d model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnext101_32x8d = flowvision.models.resnext101_32x8d(pretrained=False, progress=True)
-
flowvision.models.resnext50_32x4d(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the ResNeXt-50 32x4d model.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resnext50_32x4d = flowvision.models.resnext50_32x4d(pretrained=False, progress=True)
-
flowvision.models.wide_resnet101_2(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the Wide ResNet-101-2 model.
Note
Wide Residual Networks. The model is the same as ResNet except for the bottleneck number of channels which is twice larger in every block. The number of channels in outer 1x1 convolutions is the same, e.g.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> wide_resnet101_2 = flowvision.models.wide_resnet101_2(pretrained=False, progress=True)
-
flowvision.models.wide_resnet50_2(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.resnet.ResNet[source]¶ Constructs the Wide ResNet-50-2 model.
Note
Wide Residual Networks. The model is the same as ResNet except for the bottleneck number of channels which is twice larger in every block. The number of channels in outer 1x1 convolutions is the same, e.g. last block in ResNet-50 has 2048-512-2048 channels, and in Wide ResNet-50-2 has 2048-1024-2048.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> wide_resnet50_2 = flowvision.models.wide_resnet50_2(pretrained=False, progress=True)
DenseNet¶
-
flowvision.models.densenet121(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.densenet.DenseNet[source]¶ Constructs the DenseNet-121 model.
Note
DenseNet-121 model architecture from the Densely Connected Convolutional Networks paper. The required minimum input size of the model is 29x29.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> densenet121 = flowvision.models.densenet121(pretrained=False, progress=True)
-
flowvision.models.densenet161(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.densenet.DenseNet[source]¶ Constructs the DenseNet-161 model.
Note
DenseNet-161 model architecture from the Densely Connected Convolutional Networks paper. The required minimum input size of the model is 29x29.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> densenet161 = flowvision.models.densenet161(pretrained=False, progress=True)
-
flowvision.models.densenet169(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.densenet.DenseNet[source]¶ Constructs the DenseNet-169 model.
Note
DenseNet-169 model architecture from the Densely Connected Convolutional Networks paper. The required minimum input size of the model is 29x29.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> densenet169 = flowvision.models.densenet169(pretrained=False, progress=True)
-
flowvision.models.densenet201(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.densenet.DenseNet[source]¶ Constructs the DenseNet-201 model.
Note
DenseNet-201 model architecture from the Densely Connected Convolutional Networks paper. The required minimum input size of the model is 29x29.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> densenet201 = flowvision.models.densenet201(pretrained=False, progress=True)
ShuffleNetV2¶
-
flowvision.models.shufflenet_v2_x0_5(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.shufflenet_v2.ShuffleNetV2[source]¶ Constructs the ShuffleNetV2(0.5x) model.
Note
ShuffleNetV2 with 0.5x output channels model architecture from the ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> shufflenet_v2_x0_5 = flowvision.models.shufflenet_v2_x0_5(pretrained=False, progress=True)
-
flowvision.models.shufflenet_v2_x1_0(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.shufflenet_v2.ShuffleNetV2[source]¶ Constructs the ShuffleNetV2(1.0x) model.
Note
ShuffleNetV2 with 1.0x output channels model architecture from the ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> shufflenet_v2_x1_0 = flowvision.models.shufflenet_v2_x1_0(pretrained=False, progress=True)
-
flowvision.models.shufflenet_v2_x1_5(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.shufflenet_v2.ShuffleNetV2[source]¶ Constructs the ShuffleNetV2(1.5x) model.
Note
ShuffleNetV2 with 1.5x output channels model architecture from the ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> shufflenet_v2_x1_5 = flowvision.models.shufflenet_v2_x1_5(pretrained=False, progress=True)
-
flowvision.models.shufflenet_v2_x2_0(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.shufflenet_v2.ShuffleNetV2[source]¶ Constructs the ShuffleNetV2(2.0x) model.
Note
ShuffleNetV2 with 2.0x output channels model architecture from the ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> shufflenet_v2_x2_0 = flowvision.models.shufflenet_v2_x2_0(pretrained=False, progress=True)
MobileNetV2¶
-
flowvision.models.mobilenet_v2(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.mobilenet_v2.MobileNetV2[source]¶ Constructs the MobileNetV2 model.
Note
MobileNetV2 model architecture from the MobileNetV2: Inverted Residuals and Linear Bottlenecks paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mobilenet_v2 = flowvision.models.mobilenet_v2(pretrained=False, progress=True)
MobileNetV3¶
-
flowvision.models.mobilenet_v3_large(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.mobilenet_v3.MobileNetV3[source]¶ Constructs the MobileNetV3-Large model.
Note
MobileNetV3-Large model architecture from the Searching for MobileNetV3 paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mobilenet_v3_large = flowvision.models.mobilenet_v3_large(pretrained=False, progress=True)
-
flowvision.models.mobilenet_v3_small(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.mobilenet_v3.MobileNetV3[source]¶ Constructs the MobileNetV3-Small model.
Note
MobileNetV3-Small model architecture from the Searching for MobileNetV3 paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mobilenet_v3_small = flowvision.models.mobilenet_v3_small(pretrained=False, progress=True)
MNASNet¶
-
flowvision.models.mnasnet0_5(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the MNASNet model with depth multiplier of 0.5.
Note
MNASNet model with depth multiplier of 0.5 from the MnasNet: Platform-Aware Neural Architecture Search for Mobile paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mnasnet0_5 = flowvision.models.mnasnet0_5(pretrained=False, progress=True)
-
flowvision.models.mnasnet0_75(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the MNASNet model with depth multiplier of 0.75.
Note
MNASNet model with depth multiplier of 0.75 from the MnasNet: Platform-Aware Neural Architecture Search for Mobile paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mnasnet0_75 = flowvision.models.mnasnet0_75(pretrained=False, progress=True)
-
flowvision.models.mnasnet1_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the MNASNet model with depth multiplier of 1.0.
Note
MNASNet model with depth multiplier of 1.0 from the MnasNet: Platform-Aware Neural Architecture Search for Mobile paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mnasnet1_0 = flowvision.models.mnasnet1_0(pretrained=False, progress=True)
-
flowvision.models.mnasnet1_3(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the MNASNet model with depth multiplier of 1.3.
Note
MNASNet model with depth multiplier of 1.3 from the MnasNet: Platform-Aware Neural Architecture Search for Mobile paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mnasnet1_3 = flowvision.models.mnasnet1_3(pretrained=False, progress=True)
GhostNet¶
-
flowvision.models.ghostnet(pretrained: bool = False, progress: bool = True, **kwargs: Any)[source]¶ Constructs the GhostNet model.
Note
GhostNet model from GhostNet: More Features from Cheap Operations.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> ghostnet = flowvision.models.ghostnet(pretrained=True, progress=True)
Res2Net¶
-
flowvision.models.res2net101_26w_4s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-101_26w_4s model.
Note
Res2Net-101_26w_4s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net101_26w_4s = flowvision.models.res2net101_26w_4s(pretrained=False, progress=True)
-
flowvision.models.res2net50_14w_8s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-50_14w_8s model.
Note
Res2Net-50_14w_8s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net50_14w_8s = flowvision.models.res2net50_14w_8s(pretrained=False, progress=True)
-
flowvision.models.res2net50_26w_4s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-50_26w_4s model.
Note
Res2Net-50_26w_4s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net50_26w_4s = flowvision.models.res2net50_26w_4s(pretrained=False, progress=True)
-
flowvision.models.res2net50_26w_6s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-50_26w_6s model.
Note
Res2Net-50_26w_6s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net50_26w_6s = flowvision.models.res2net50_26w_6s(pretrained=False, progress=True)
-
flowvision.models.res2net50_26w_8s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-50_26w_8s model.
Note
Res2Net-50_26w_8s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net50_26w_8s = flowvision.models.res2net50_26w_8s(pretrained=False, progress=True)
-
flowvision.models.res2net50_48w_2s(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Res2Net-50_48w_2s model.
Note
Res2Net-50_48w_2s model from the Res2Net: A New Multi-scale Backbone Architecture paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> res2net50_48w_2s = flowvision.models.res2net50_48w_2s(pretrained=False, progress=True)
EfficientNet¶
-
flowvision.models.efficientnet_b0(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B0 model.
Note
EfficientNet B0 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (256, 224) for efficientnet-b0 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b0 = flowvision.models.efficientnet_b0(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b1(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B1 model.
Note
EfficientNet B1 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (256, 240) for efficientnet-b1 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b1 = flowvision.models.efficientnet_b1(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b2(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B2 model.
Note
EfficientNet B2 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (288, 288) for efficientnet-b2 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b2 = flowvision.models.efficientnet_b2(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b3(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B3 model.
Note
EfficientNet B3 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (320, 300) for efficientnet-b3 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b3 = flowvision.models.efficientnet_b3(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b4(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B4 model.
Note
EfficientNet B4 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (384, 380) for efficientnet-b4 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b4 = flowvision.models.efficientnet_b4(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b5(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B5 model.
Note
EfficientNet B5 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (489, 456) for efficientnet-b5 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b5 = flowvision.models.efficientnet_b5(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b6(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B6 model.
Note
EfficientNet B6 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (561, 528) for efficientnet-b6 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b6 = flowvision.models.efficientnet_b6(pretrained=False, progress=True)
-
flowvision.models.efficientnet_b7(pretrained: bool = False, progress: bool = True, **kwargs: Any) → flowvision.models.efficientnet.EfficientNet[source]¶ Constructs the EfficientNet B7 model.
Note
EfficientNet B7 model architecture from the EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks paper. Note that the (resize-size, crop-size) should be (633, 600) for efficientnet-b7 model when training and testing.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> efficientnet_b7 = flowvision.models.efficientnet_b7(pretrained=False, progress=True)
ReXNet¶
-
flowvision.models.rexnet_lite_1_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet-lite model with width multiplier of 1.0.
Note
ReXNet-lite model with width multiplier of 1.0 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnet_lite_1_0 = flowvision.models.rexnet_lite_1_0(pretrained=False, progress=True)
-
flowvision.models.rexnet_lite_1_3(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet-lite model with width multiplier of 1.3.
Note
ReXNet-lite model with width multiplier of 1.3 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnet_lite_1_3 = flowvision.models.rexnet_lite_1_3(pretrained=False, progress=True)
-
flowvision.models.rexnet_lite_1_5(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet-lite model with width multiplier of 1.5.
Note
ReXNet-lite model with width multiplier of 1.5 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnet_lite_1_5 = flowvision.models.rexnet_lite_1_5(pretrained=False, progress=True)
-
flowvision.models.rexnet_lite_2_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet-lite model with width multiplier of 2.0.
Note
ReXNet-lite model with width multiplier of 2.0 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnet_lite_2_0 = flowvision.models.rexnet_lite_2_0(pretrained=False, progress=True)
-
flowvision.models.rexnetv1_1_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet model with width multiplier of 1.0.
Note
ReXNet model with width multiplier of 1.0 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnetv1_1_0 = flowvision.models.rexnetv1_1_0(pretrained=False, progress=True)
-
flowvision.models.rexnetv1_1_3(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet model with width multiplier of 1.3.
Note
ReXNet model with width multiplier of 1.3 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnetv1_1_3 = flowvision.models.rexnetv1_1_3(pretrained=False, progress=True)
-
flowvision.models.rexnetv1_1_5(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet model with width multiplier of 1.5.
Note
ReXNet model with width multiplier of 1.5 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnetv1_1_5 = flowvision.models.rexnetv1_1_5(pretrained=False, progress=True)
-
flowvision.models.rexnetv1_2_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet model with width multiplier of 2.0.
Note
ReXNet model with width multiplier of 2.0 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnetv1_2_0 = flowvision.models.rexnetv1_2_0(pretrained=False, progress=True)
-
flowvision.models.rexnetv1_3_0(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ReXNet model with width multiplier of 3.0.
Note
ReXNet model with width multiplier of 3.0 from the Rethinking Channel Dimensions for Efficient Model Design paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> rexnetv1_3_0 = flowvision.models.rexnetv1_3_0(pretrained=False, progress=True)
ViT¶
-
flowvision.models.vit_base_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-224 model.
Note
ViT-Base-patch16-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_224 = flowvision.models.vit_base_patch16_224(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-224 ImageNet21k pretrained model.
Note
ViT-Base-patch16-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_224_in21k = flowvision.models.vit_base_patch16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch16_224_miil(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-224-miil model.
Note
ViT-Base-patch16-224-miil model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_224_miil = flowvision.models.vit_base_patch16_224_miil(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch16_224_miil_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-224-miil ImageNet21k pretrained model.
Note
ViT-Base-patch16-224-miil ImageNet21k pretrained model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_224_miil_in21k = flowvision.models.vit_base_patch16_224_miil_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch16_224_sam(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-224-sam model.
Note
ViT-Base-patch16-224-sam model from “When Vision Transformers Outperform ResNets without Pre-training or Strong Data Augmentations”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_224_sam = flowvision.models.vit_base_patch16_224_sam(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch16-384 model.
Note
ViT-Base-patch16-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch16_384 = flowvision.models.vit_base_patch16_384(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch32-224 model.
Note
ViT-Base-patch32-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch32_224 = flowvision.models.vit_base_patch32_224(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch32_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch32-224 ImageNet21k pretrained model.
Note
ViT-Base-patch32-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch32_224_in21k = flowvision.models.vit_base_patch32_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch32_224_sam(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch32-224-sam model.
Note
ViT-Base-patch32-224-sam model from “When Vision Transformers Outperform ResNets without Pre-training or Strong Data Augmentations”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch32_224_sam = flowvision.models.vit_base_patch32_224_sam(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch32_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch32-384 model.
Note
ViT-Base-patch32-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch32_384 = flowvision.models.vit_base_patch32_384(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch8_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch8-224 model.
Note
ViT-Base-patch8-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch8_224 = flowvision.models.vit_base_patch8_224(pretrained=False, progress=True)
-
flowvision.models.vit_base_patch8_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Base-patch8-224 ImageNet21k pretrained model.
Note
ViT-Base-patch8-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_base_patch8_224_in21k = flowvision.models.vit_base_patch8_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_giant_patch14_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Giant-patch14-224 model.
Note
ViT-Giant-patch14-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_giant_patch14_224 = flowvision.models.vit_giant_patch14_224(pretrained=False, progress=True)
-
flowvision.models.vit_gigantic_patch14_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Gigantic-patch14-224 model.
Note
ViT-Giant-patch14-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_gigantic_patch14_224 = flowvision.models.vit_gigantic_patch14_224(pretrained=False, progress=True)
-
flowvision.models.vit_huge_patch14_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Huge-patch14-224 model.
Note
ViT-Huge-patch14-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_huge_patch14_224 = flowvision.models.vit_huge_patch14_224(pretrained=False, progress=True)
-
flowvision.models.vit_huge_patch14_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Huge-patch14-224 ImageNet21k pretrained model.
Note
ViT-Huge-patch14-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_huge_patch14_224_in21k = flowvision.models.vit_huge_patch14_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch16-224 model.
Note
ViT-Large-patch16-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch16_224 = flowvision.models.vit_large_patch16_224(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch16-224 ImageNet21k pretrained model.
Note
ViT-Large-patch16-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch16_224_in21k = flowvision.models.vit_large_patch16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch16-384 model.
Note
ViT-Large-patch16-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch16_384 = flowvision.models.vit_large_patch16_384(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch32-224 model.
Note
ViT-Large-patch32-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch32_224 = flowvision.models.vit_large_patch32_224(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch32_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch32-224 ImageNet21k pretrained model.
Note
ViT-Large-patch32-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch32_224_in21k = flowvision.models.vit_large_patch32_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_large_patch32_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Large-patch32-384 model.
Note
ViT-Large-patch32-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_large_patch32_384 = flowvision.models.vit_large_patch32_384(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch16-224 model.
Note
ViT-Small-patch16-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch16_224 = flowvision.models.vit_small_patch16_224(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch16-224 ImageNet21k pretrained model.
Note
ViT-Small-patch16-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch16_224_in21k = flowvision.models.vit_small_patch16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch16-384 model.
Note
ViT-Small-patch16-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch16_384 = flowvision.models.vit_small_patch16_384(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch32-224 model.
Note
ViT-Small-patch32-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch32_224 = flowvision.models.vit_small_patch32_224(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch32_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch32-224 ImageNet21k pretrained model.
Note
ViT-Small-patch32-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch32_224_in21k = flowvision.models.vit_small_patch32_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_small_patch32_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Small-patch32-384 model.
Note
ViT-Small-patch32-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_small_patch32_384 = flowvision.models.vit_small_patch32_384(pretrained=False, progress=True)
-
flowvision.models.vit_tiny_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Tiny-patch16-224 model.
Note
ViT-Tiny-patch16-224 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_tiny_patch16_224 = flowvision.models.vit_tiny_patch16_224(pretrained=False, progress=True)
-
flowvision.models.vit_tiny_patch16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Tiny-patch16-224 ImageNet21k pretrained model.
Note
ViT-Tiny-patch16-224 ImageNet21k pretrained model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_tiny_patch16_224_in21k = flowvision.models.vit_tiny_patch16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.vit_tiny_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ViT-Tiny-patch16-384 model.
Note
ViT-Tiny-patch16-384 model from “An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> vit_tiny_patch16_384 = flowvision.models.vit_tiny_patch16_384(pretrained=False, progress=True)
DeiT¶
-
flowvision.models.deit_base_distilled_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Base-patch16-224 distilled model.
Note
DeiT-Base-patch16-224 distilled model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_base_distilled_patch16_224 = flowvision.models.deit_base_distilled_patch16_224(pretrained=False, progress=True)
-
flowvision.models.deit_base_distilled_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Base-patch16-384 distilled model.
Note
DeiT-Base-patch16-384 distilled model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_base_distilled_patch16_384 = flowvision.models.deit_base_distilled_patch16_384(pretrained=False, progress=True)
-
flowvision.models.deit_base_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Base-patch16-224 model.
Note
DeiT-Base-patch16-224 model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_base_patch16_224 = flowvision.models.deit_base_patch16_224(pretrained=False, progress=True)
-
flowvision.models.deit_base_patch16_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Base-patch16-384 model.
Note
DeiT-Base-patch16-384 model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 384x384.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_base_patch16_384 = flowvision.models.deit_base_patch16_384(pretrained=False, progress=True)
-
flowvision.models.deit_small_distilled_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Small-patch16-224 distilled model.
Note
DeiT-Small-patch16-224 distilled model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_small_distilled_patch16_224 = flowvision.models.deit_small_distilled_patch16_224(pretrained=False, progress=True)
-
flowvision.models.deit_small_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Small-patch16-224 model.
Note
DeiT-Small-patch16-224 model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_small_patch16_224 = flowvision.models.deit_small_patch16_224(pretrained=False, progress=True)
-
flowvision.models.deit_tiny_distilled_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Tiny-patch16-224 distilled model.
Note
DeiT-Tiny-patch16-224 distilled model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_tiny_distilled_patch16_224 = flowvision.models.deit_tiny_distilled_patch16_224(pretrained=False, progress=True)
-
flowvision.models.deit_tiny_patch16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the DeiT-Tiny-patch16-224 model.
Note
DeiT-Tiny-patch16-224 model from “Training data-efficient image transformers & distillation through attention”. The required input size of the model is 224x224.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> deit_tiny_patch16_224 = flowvision.models.deit_tiny_patch16_224(pretrained=False, progress=True)
PVT¶
-
flowvision.models.pvt_large(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the PVT-large model.
Note
PVT-large model from “Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> pvt_large = flowvision.models.pvt_large(pretrained=False, progress=True)
-
flowvision.models.pvt_medium(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the PVT-medium model.
Note
PVT-medium model from “Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> pvt_medium = flowvision.models.pvt_medium(pretrained=False, progress=True)
-
flowvision.models.pvt_small(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the PVT-small model.
Note
PVT-small model from “Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> pvt_small = flowvision.models.pvt_small(pretrained=False, progress=True)
-
flowvision.models.pvt_tiny(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the PVT-tiny model.
Note
PVT-tiny model from “Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> pvt_tiny = flowvision.models.pvt_tiny(pretrained=False, progress=True)
Swin-Transformer¶
-
flowvision.models.swin_base_patch4_window12_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-B 384x384 model trained on ImageNet-1k.
Note
Swin-B 384x384 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_base_patch4_window12_384 = flowvision.models.swin_base_patch4_window12_384(pretrained=False, progress=True)
-
flowvision.models.swin_base_patch4_window12_384_in22k_to_1k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-B 384x384 model pretrained on ImageNet-22k and fine tuned on ImageNet-1k.
Note
Swin-B 384x384 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_base_patch4_window12_384_in22k_to_1k = flowvision.models.swin_base_patch4_window12_384_in22k_to_1k(pretrained=False, progress=True)
-
flowvision.models.swin_base_patch4_window7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-B 224x224 model trained on ImageNet-1k.
Note
Swin-B 224x224 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_base_patch4_window7_224 = flowvision.models.swin_base_patch4_window7_224(pretrained=False, progress=True)
-
flowvision.models.swin_base_patch4_window7_224_in22k_to_1k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-B 224x224 model pretrained on ImageNet-22k and fine tuned on ImageNet-1k.
Note
Swin-B 224x224 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_base_patch4_window7_224_in22k_to_1k = flowvision.models.swin_base_patch4_window7_224_in22k_to_1k(pretrained=False, progress=True)
-
flowvision.models.swin_large_patch4_window12_384_in22k_to_1k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-L 384x384 model pretrained on ImageNet-22k and fine tuned on ImageNet-1k.
Note
Swin-L 384x384 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_large_patch4_window12_384_in22k_to_1k = flowvision.models.swin_large_patch4_window12_384_in22k_to_1k(pretrained=False, progress=True)
-
flowvision.models.swin_large_patch4_window7_224_in22k_to_1k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-L 224x224 model pretrained on ImageNet-22k and fine tuned on ImageNet-1k.
Note
Swin-L 224x224 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_large_patch4_window7_224_in22k_to_1k = flowvision.models.swin_large_patch4_window7_224_in22k_to_1k(pretrained=False, progress=True)
-
flowvision.models.swin_small_patch4_window7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-S 224x224 model trained on ImageNet-1k.
Note
Swin-S 224x224 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_small_patch4_window7_224 = flowvision.models.swin_small_patch4_window7_224(pretrained=False, progress=True)
-
flowvision.models.swin_tiny_patch4_window7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs Swin-T 224x224 model trained on ImageNet-1k.
Note
Swin-T 224x224 model from “Swin Transformer: Hierarchical Vision Transformer using Shifted Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> swin_tiny_patch4_window7_224 = flowvision.models.swin_tiny_patch4_window7_224(pretrained=False, progress=True)
CSwin-Transformer¶
-
flowvision.models.cswin_base_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-B 224x224 model.
Note
CSwin-B 224x224 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_base_224 = flowvision.models.cswin_base_224(pretrained=False, progress=True)
-
flowvision.models.cswin_base_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-B 384x384 model.
Note
CSwin-B 384x384 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_base_384 = flowvision.models.cswin_base_384(pretrained=False, progress=True)
-
flowvision.models.cswin_large_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-L 224x224 model.
Note
CSwin-L 224x224 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_large_224 = flowvision.models.cswin_large_224(pretrained=False, progress=True)
-
flowvision.models.cswin_large_384(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-L 384x384 model.
Note
CSwin-L 384x384 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_large_384 = flowvision.models.cswin_large_384(pretrained=False, progress=True)
-
flowvision.models.cswin_small_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-S 224x224 model.
Note
CSwin-S 224x224 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_small_224 = flowvision.models.cswin_small_224(pretrained=False, progress=True)
-
flowvision.models.cswin_tiny_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CSwin-T 224x224 model.
Note
CSwin-T 224x224 model from “CSWin Transformer: A General Vision Transformer Backbone with Cross-Shaped Windows”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> cswin_tiny_224 = flowvision.models.cswin_tiny_224(pretrained=False, progress=True)
CrossFormer¶
-
flowvision.models.crossformer_base_patch4_group7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CrossFormer-B 224x224 model.
Note
CrossFormer-B 224x224 model from “CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> crossformer_base_patch4_group7_224 = flowvision.models.crossformer_base_patch4_group7_224(pretrained=False, progress=True)
-
flowvision.models.crossformer_large_patch4_group7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CrossFormer-L 224x224 model.
Note
CrossFormer-L 224x224 model from “CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> crossformer_large_patch4_group7_224 = flowvision.models.crossformer_large_patch4_group7_224(pretrained=False, progress=True)
-
flowvision.models.crossformer_small_patch4_group7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CrossFormer-S 224x224 model.
Note
CrossFormer-S 224x224 model from “CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> crossformer_small_patch4_group7_224 = flowvision.models.crossformer_small_patch4_group7_224(pretrained=False, progress=True)
-
flowvision.models.crossformer_tiny_patch4_group7_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs CrossFormer-T 224x224 model.
Note
CrossFormer-T 224x224 model from “CrossFormer: A Versatile Vision Transformer Based on Cross-scale Attention”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> crossformer_tiny_patch4_group7_224 = flowvision.models.crossformer_tiny_patch4_group7_224(pretrained=False, progress=True)
Mlp-Mixer¶
-
flowvision.models.mlp_mixer_b16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-B/16 224x224 model.
Note
Mixer-B/16 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_b16_224 = flowvision.models.mlp_mixer_b16_224(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_b16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-B/16 224x224 ImageNet21k pretrained model.
Note
Mixer-B/16 224x224 ImageNet21k pretrained model from “MLP-Mixer: An all-MLP Architecture for Vision”. Note that this model is the pretrained model for fine-tune on different datasets.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_b16_224_in21k = flowvision.models.mlp_mixer_b16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_b16_224_miil(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-B/16 224x224 model with different weights.
Note
Mixer-B/16 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”. Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_b16_224_miil = flowvision.models.mlp_mixer_b16_224_miil(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_b16_224_miil_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-B/16 224x224 ImageNet21k pretrained model.
Note
Mixer-B/16 224x224 ImageNet21k pretrained model from “MLP-Mixer: An all-MLP Architecture for Vision”. Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_b16_224_miil_in21k = flowvision.models.mlp_mixer_b16_224_miil_in21k(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_b32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-B/32 224x224 model.
Note
Mixer-B/32 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_b32_224 = flowvision.models.mlp_mixer_b32_224(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_l16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-L/16 224x224 model.
Note
Mixer-L/16 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_l16_224 = flowvision.models.mlp_mixer_l16_224(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_l16_224_in21k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-L/16 224x224 ImageNet21k pretrained model.
Note
Mixer-L/16 224x224 ImageNet21k pretrained model from “MLP-Mixer: An all-MLP Architecture for Vision”. Note that this model is the pretrained model for fine-tune on different datasets.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_l16_224_in21k = flowvision.models.mlp_mixer_l16_224_in21k(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_l32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-L/32 224x224 model.
Note
Mixer-L/32 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_l32_224 = flowvision.models.mlp_mixer_l32_224(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_s16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-S/16 224x224 model.
Note
Mixer-S/16 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_s16_224 = flowvision.models.mlp_mixer_s16_224(pretrained=False, progress=True)
-
flowvision.models.mlp_mixer_s32_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the Mixer-S/32 224x224 model.
Note
Mixer-S/32 224x224 model from “MLP-Mixer: An all-MLP Architecture for Vision”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> mlp_mixer_s32_224 = flowvision.models.mlp_mixer_s32_224(pretrained=False, progress=True)
ResMLP¶
-
flowvision.models.resmlp_12_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-12 model.
Note
ResMLP-12 model from “ResMLP: Feedforward networks for image classification with data-efficient training”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_12_224 = flowvision.models.resmlp_12_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_12_224_dino(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-12 model trained under DINO proposed in “Emerging Properties in Self-Supervised Vision Transformers”.
Note
ResMLP-12 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlp_12 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_12_224_dino = flowvision.models.resmlp_12_224_dino(pretrained=False, progress=True)
-
flowvision.models.resmlp_12_distilled_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-12 model with distillation.
Note
ResMLP-12 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlp_12 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_12_distilled_224 = flowvision.models.resmlp_12_distilled_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_24_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-24 model.
Note
ResMLP-24 model from “ResMLP: Feedforward networks for image classification with data-efficient training”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_24_224 = flowvision.models.resmlp_24_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_24_224_dino(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-24 model trained under DINO proposed in “Emerging Properties in Self-Supervised Vision Transformers”.
Note
ResMLP-24 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlp_24 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_24_224_dino = flowvision.models.resmlp_24_224_dino(pretrained=False, progress=True)
-
flowvision.models.resmlp_24_distilled_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-24 model with distillation.
Note
ResMLP-24 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlp_24 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_24_distilled_224 = flowvision.models.resmlp_24_distilled_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_36_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-36 model.
Note
ResMLP-36 model from “ResMLP: Feedforward networks for image classification with data-efficient training”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_36_224 = flowvision.models.resmlp_36_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_36_distilled_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-36 model with distillation.
Note
ResMLP-36 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlp_36 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_36_distilled_224 = flowvision.models.resmlp_36_distilled_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_big_24_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-Big-24 model.
Note
ResMLP-Big-24 model from “ResMLP: Feedforward networks for image classification with data-efficient training”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_big_24_224 = flowvision.models.resmlp_big_24_224(pretrained=False, progress=True)
-
flowvision.models.resmlp_big_24_224_in22k_to_1k(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ImageNet22k pretrained ResMLP-B-24 model.
Note
ImageNet22k pretrained ResMLP-B-24 model from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlpB_24 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_big_24_224_in22k_to_1k = flowvision.models.resmlp_big_24_224_in22k_to_1k(pretrained=False, progress=True)
-
flowvision.models.resmlp_big_24_distilled_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the ResMLP-B-24 model with distillation.
Note
ResMLP-B-24 model with distillation from “ResMLP: Feedforward networks for image classification with data-efficient training”. Note that this model is the same as resmlpB_24 but the pretrained weight is different.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> resmlp_big_24_distilled_224 = flowvision.models.resmlp_big_24_distilled_224(pretrained=False, progress=True)
gMLP¶
-
flowvision.models.gmlp_b16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the gMLP-base-16 224x224 model.
Note
gMLP-base-16 224x224 model from “Pay Attention to MLPs”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> gmlp_b16_224 = flowvision.models.gmlp_b16_224(pretrained=False, progress=True)
-
flowvision.models.gmlp_s16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the gMLP-small-16 224x224 model.
Note
gMLP-small-16 224x224 model from “Pay Attention to MLPs”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> gmlp_s16_224 = flowvision.models.gmlp_s16_224(pretrained=False, progress=True)
-
flowvision.models.gmlp_ti16_224(pretrained=False, progress=True, **kwargs)[source]¶ Constructs the gMLP-tiny-16 224x224 model.
Note
gMLP-tiny-16 224x224 model from “Pay Attention to MLPs”.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> gmlp_ti16_224 = flowvision.models.gmlp_ti16_224(pretrained=False, progress=True)
ConvMixer¶
-
flowvision.models.convmixer_1024_20(pretrained: bool = False, progress: bool = True, **kwargs)[source]¶ Constructs the ConvMixer model with 20 depth and 1024 hidden size.
Note
ConvMixer model with 20 depth and 1024 hidden size from the Patched Are All You Need? paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> convmixer_1024_20 = flowvision.models.convmixer_1024_20(pretrained=False, progress=True)
-
flowvision.models.convmixer_1536_20(pretrained: bool = False, progress: bool = True, **kwargs)[source]¶ Constructs the ConvMixer model with 20 depth and 1536 hidden size.
Note
ConvMixer model with 20 depth and 1536 hidden size from the Patched Are All You Need? paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> convmixer_1536_20 = flowvision.models.convmixer_1536_20(pretrained=False, progress=True)
-
flowvision.models.convmixer_768_32_relu(pretrained: bool = False, progress: bool = True, **kwargs)[source]¶ Constructs the ConvMixer model with 32 depth and 768 hidden size and ReLU activation layer.
Note
ConvMixer model with 32 depth and 768 hidden size and ReLU activation layer from the Patched Are All You Need? paper.
- Parameters
pretrained (bool) – Whether to download the pre-trained model on ImageNet. Default:
Falseprogress (bool) – If True, displays a progress bar of the download to stderr. Default:
True
For example:
>>> import flowvision >>> convmixer_768_32_relu = flowvision.models.convmixer_768_32_relu(pretrained=False, progress=True)