Vision Transformer#
- torchgeo.models.vit_small_patch16_224(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) small patch size 16 model.
If you use this model in your research, please cite the following paper:
Added in version 0.4.
- Parameters:
weights (ViTSmall16_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A ViT small 16 model.
- Return type:
- torchgeo.models.vit_base_patch16_224(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) base patch size 16 model.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (ViTBase16_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A ViT base 16 model.
- Return type:
- torchgeo.models.vit_large_patch16_224(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) large patch size 16 model.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (ViTLarge16_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A ViT large 16 model.
- Return type:
- torchgeo.models.vit_huge_patch14_224(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) huge patch size 14 model.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (ViTHuge14_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A ViT huge 14 model.
- Return type:
- torchgeo.models.vit_small_patch14_dinov2(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) small patch size 14 model for DINOv2.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (ViTSmall14_DINOv2_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A DINOv2 ViT small 14 model.
- Return type:
- torchgeo.models.vit_base_patch14_dinov2(weights=None, *args, **kwargs)[source]#
Vision Transform (ViT) base patch size 14 model for DINOv2.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (ViTBase14_DINOv2_Weights | None) – Pre-trained model weights to use.
*args (Any) – Additional arguments to pass to
timm.create_model().**kwargs (Any) – Additional keyword arguments to pass to
timm.create_model().
- Returns:
A DINOv2 ViT base 14 model.
- Return type:
- class torchgeo.models.ViTSmall16_Weights(*values)[source]#
Bases:
WeightsEnumVision Transformer Small Patch Size 16 weights.
For timm vit_small_patch16_224 implementation.
Added in version 0.4.
- __new__(value)#
- class torchgeo.models.ViTBase16_Weights(*values)[source]#
Bases:
WeightsEnumVision Transformer Base Patch Size 16 weights.
For timm vit_base_patch16_224 implementation.
Added in version 0.7.
- __new__(value)#
- class torchgeo.models.ViTLarge16_Weights(*values)[source]#
Bases:
WeightsEnumVision Transformer Large Patch Size 16 weights.
For timm vit_large_patch16_224 implementation.
Added in version 0.7.
- __new__(value)#
- class torchgeo.models.ViTHuge14_Weights(*values)[source]#
Bases:
WeightsEnumVision Transformer Huge Patch Size 14 weights.
For timm vit_huge_patch14_224 implementation.
Added in version 0.7.
- __new__(value)#