CROMA#
- class torchgeo.models.CROMA(modalities=['sar', 'optical'], encoder_dim=768, encoder_depth=12, num_heads=16, patch_size=8, image_size=120)[source]#
Bases:
ModulePretrained CROMA model.
Corresponds to the pretrained CROMA model found in the CROMA repository:
If you use this model in your research, please cite the following paper:
- __init__(modalities=['sar', 'optical'], encoder_dim=768, encoder_depth=12, num_heads=16, patch_size=8, image_size=120)[source]#
Initialize the CROMA model.
- Parameters:
modalities (Sequence[str]) – List of modalities used during forward pass, list can contain ‘sar’, ‘optical’, or both.
encoder_dim (int) – Dimension of the encoder.
encoder_depth (int) – Depth of the encoder.
num_heads (int) – Number of heads for the multi-head attention, should be power of 2.
patch_size (int) – Size of the patches.
image_size (int) – Size of the input images, CROMA was trained on 120x120 images, must be a multiple of 8.
- Raises:
AssertionError – If any arguments are not valid.
- torchgeo.models.croma_base(weights=None, *args, **kwargs)[source]#
CROMA base model.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (CROMABase_Weights | None) – Pretrained weights to load.
*args (Any) – Additional arguments to pass to :class:CROMA.`
**kwargs (Any) – Additional keyword arguments to pass to :class:CROMA.`
- Returns:
CROMA base model.
- Return type:
- torchgeo.models.croma_large(weights=None, *args, **kwargs)[source]#
CROMA large model.
If you use this model in your research, please cite the following paper:
Added in version 0.7.
- Parameters:
weights (CROMALarge_Weights | None) – Pretrained weights to load.
*args (Any) – Additional arguments to pass to :class:CROMA.`
**kwargs (Any) – Additional keyword arguments to pass to :class:CROMA.`
- Returns:
CROMA large model.
- Return type: