Who it is forAn ML engineer with a small labeled multispectral dataset.
The problemImageNet weights only know RGB, while satellite data has many more bands.
The outcomeA timm ResNet18 with the right input channels loaded with SENTINEL2_ALL_MOCO weights.
What you need first
- Python with `pip install torchgeo` (or `uv add torchgeo`)
- Enough disk space for the satellite datasets you download
- A GPU for training, as with any PyTorch project
Steps
- Install with
pip install torchgeoand timm - Import ResNet18_Weights from Torchgeo.models and pick ResNet18_Weights.SENTINEL2_ALL_MOCO
- Create the model with timm.create_model('resnet18', in_chans=weights.meta['in_chans'], num_classes=10)
- Load the weights with load_state_dict(weights.get_state_dict(progress=True, check_hash=True, weights_only=True), strict=False) and fine-tune
Prompt for your agent
Using torchgeo/torchgeo, load ResNet18_Weights.SENTINEL2_ALL_MOCO into a timm resnet18 with the right in_chans and set num_classes for <my label count>, then show a forward pass on a dummy batch.
Caveat. These weights can also be passed to TorchGeo Lightning tasks through the weights argument.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for torchgeo/torchgeo and "Fine-tune with Sentinel-2 pre-trained weights"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer