← AI Engineering
Deep Learning · Computer Vision · Transfer Learning

Satellite Land Use Classification with Transfer Learning

Freezing 99.95% of a pre-trained ResNet18 and training only its final layer, to classify satellite imagery into 10 land use categories — reaching 93% accuracy without ever retraining the network's visual features.

Python PyTorch ResNet18 Transfer Learning

The problem

Can a model pre-trained on everyday photographs — never once shown a satellite image — be adapted to classify land use from space? 27,000 Sentinel-2 satellite images across 10 categories, from forests to highways to residential areas, were used to find out.

Key results

93.19%
Test accuracy
5,130
Trainable parameters
0.046%
Of the network actually trained
5
Training epochs

Why transfer learning, not training from scratch

Training a CNN from scratch means learning everything from zero — including basic visual building blocks like edge and texture detectors, which demand large amounts of data and compute to learn well. A model pre-trained on ImageNet (1.2 million photographs) has already learned excellent general-purpose visual features. This project reuses them directly: a ResNet18 was loaded with its pre-trained weights, every parameter was frozen, and only a new final classification layer — sized for EuroSAT's 10 classes — was trained.

Just 5,130 parameters were trained, out of 11.2 million in the full network — 0.046% of the model.

Training and results

Training accuracy rose from 83% in the first epoch to 91.8% by the fifth, converging quickly — expected, given that only a small classifier was being trained on top of already-strong frozen features. On the held-out test set, the model reached 93.19% accuracy, with macro and weighted F1-scores both at 0.93, indicating fairly uniform performance across all 10 classes.

Where the model struggles

Two classes stood out as harder to tell apart: Highway and River. 21 highway images were misclassified as river, while 52 river images were misclassified as highway — a clearly asymmetric confusion.

Confusion matrix heatmap for the 10 EuroSAT classes, showing the Highway and River classes as the most frequently confused with each other
Highway and River are the model's weakest pair — confused with each other far more than any other class combination.

A plausible explanation, rather than a modeling flaw: both highways and rivers tend to appear in satellite imagery as long, narrow, elongated features cutting across the frame — a geometric similarity that could reasonably confuse a model relying on general visual features rather than domain-specific cues (water reflectance, road markings) that a model trained directly on satellite data might exploit more precisely. The asymmetry is intuitive too: a river's winding path more easily resembles a highway's lines than the reverse.

Tools used

Python PyTorch torchvision scikit-learn Seaborn