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:
Returns:

A ViT small 16 model.

Return type:

Module

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:
Returns:

A ViT base 16 model.

Return type:

Module

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:
Returns:

A ViT large 16 model.

Return type:

Module

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:
Returns:

A ViT huge 14 model.

Return type:

Module

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:
Returns:

A DINOv2 ViT small 14 model.

Return type:

Module

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:
Returns:

A DINOv2 ViT base 14 model.

Return type:

Module

class torchgeo.models.ViTSmall16_Weights(*values)[source]#

Bases: WeightsEnum

Vision 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: WeightsEnum

Vision 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: WeightsEnum

Vision 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: WeightsEnum

Vision Transformer Huge Patch Size 14 weights.

For timm vit_huge_patch14_224 implementation.

Added in version 0.7.

__new__(value)#
class torchgeo.models.ViTSmall14_DINOv2_Weights(*values)[source]#

Bases: WeightsEnum

Vision Transformer Small Patch Size 14 (DINOv2) weights.

For timm vit_small_patch14_dinov2 implementation.

Added in version 0.7.

__new__(value)#
class torchgeo.models.ViTBase14_DINOv2_Weights(*values)[source]#

Bases: WeightsEnum

Vision Transformer Base Patch Size 14 (DINOv2) weights.

For timm vit_base_patch14_dinov2 implementation.

Added in version 0.7.

__new__(value)#