torchgeo/eurosat
Viewer • Updated • 54.1k • 4.16k • 2
Small PyTorch CNN for 10-class EuroSAT land-use classification.
This model is used by the Gradio Space:
| Field | Value |
|---|---|
| Architecture | Four Conv-BN-ReLU-Pool blocks plus dense classifier |
| Parameters | 2,492,170 |
| Input | RGB image resized to 64 x 64 |
| Output | 10 EuroSAT land-use classes |
| Runtime | CPU-friendly PyTorch inference |
Classes:
AnnualCrop, Forest, HerbaceousVegetation, Highway, Industrial,
Pasture, PermanentCrop, Residential, River, SeaLake
import torch
from huggingface_hub import hf_hub_download
from model import SimpleNet, CLASS_NAMES
weights = hf_hub_download(
repo_id="yava-code/eurosat-simplenet",
filename="simple_net_v1.pth",
)
model = SimpleNet(num_classes=len(CLASS_NAMES))
model.load_state_dict(torch.load(weights, map_location="cpu"))
model.eval()
For the Build Small Hackathon Space, the same state dict is converted to
float16 chunks so the app can be reviewed without Git LFS write permissions in
the organization repo. The runtime reconstructs the bytes, casts tensors back to
float32, and loads the explicit SimpleNet architecture.
This model is trained for EuroSAT-style RGB tiles. It should not be used for production geospatial decisions without target-domain validation, calibration, and uncertainty handling.