Skip to content

TorchGeo Model Integration #2

@isaaccorley

Description

@isaaccorley

Hi team! Great work with the SSL4Eco dataset, new benchmarks, and pretrained model!

I have made a PR torchgeo/torchgeo#2849 for adding the pretrained resnet50 weights to be loadable in torchgeo

Once it's merged the weights should be loadable in a few lines of code along with any additional features from the timm library:

from torchgeo.models import resnet50, ResNet50_Weights

model = resnet50(weights=ResNet50_Weights.SENTINEL2_ALL_SECO_ECO)

x = torch.randn(1, 9, 224, 224)

with torch.inference_mode():
	features = model(x)  # (1, 2048)

Let me know if anything looks incorrect in the PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions