allenai / allenai/satlaspretrain_models

Sentinel-2 ResNet50 multi-image MS model does not accept multi-image input

Offen
#16 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Jupyter Notebook
Sterne
155
Forks
23
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

The Sentinel2_Resnet50_MI_MS (multi-image) model is exactly the same as the Sentinel2_Resnet50_SI_MS (single image) model, and hence does not accept multi-image input.

In model.py, the following code means that a ResNet model is never loaded as a multi-image model. If the first if statement is commented out, then there is an error in loading the state_dict for Sentinel2_Resnet50_MI_MS.

```
# If using a model for multi-image, need the Aggretation to wrap underlying backbone model.
prefix, prefix_allowed_count = None, None
if backbone_arch in [Backbone.RESNET50, Backbone.RESNET152]:
prefix_allowed_count = 0
elif multi_image:
backbone = AggregationBackbone(num_channels, backbone)
prefix_allowed_count = 2
else:
prefix_allowed_count = 1
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.