rslearn.models.satlaspretrain¶
satlaspretrain ¶
SatlasPretrain models.
SatlasPretrain ¶
Bases: FeatureExtractor
SatlasPretrain backbones.
Source code in rslearn/models/satlaspretrain.py
maybe_resize ¶
Resize to pretraining sizes if resize_to_pretrain == True.
Source code in rslearn/models/satlaspretrain.py
forward ¶
forward(context: ModelContext) -> FeatureMaps
Compute feature maps from the SatlasPretrain backbone.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
context
|
ModelContext
|
the model context. Input dicts must contain an "image" key containing the image input to the model. |
required |
Returns:
| Type | Description |
|---|---|
FeatureMaps
|
multi-resolution feature maps computed by the model. |
Source code in rslearn/models/satlaspretrain.py
get_backbone_channels ¶
Returns the output channels of this model when used as a backbone.
The output channels is a list of (downsample_factor, depth) that corresponds to the feature maps that the backbone returns. For example, an element [2, 32] indicates that the corresponding feature map is 1/2 the input resolution and has 32 channels.
Returns:
| Type | Description |
|---|---|
list
|
the output channels of the backbone as a list of (downsample_factor, depth) |
list
|
tuples. |