wikillm

Paper · 2021-10-06 · cs.CV

Deep Transfer Learning for Land Use and Land Cover Classification: A Comparative Study

Fine-tunes ImageNet-pretrained VGG16 and Wide ResNet-50 for land-cover classification on the RGB EuroSAT dataset, with augmentation, early stopping, gradient clipping and LR reduction on plateau. Author-reported: Wide ResNet-50 with augmentation reaches 99.17% accuracy, VGG16 with augmentation 98.55%. The reported split also drives model selection.

Transfer learningData augmentationGradient clippingLearning-rate schedulesremote-sensingland-coverscene-classificationeurosatfine-tuningvgg16wide-resnet

arXivPDFCodeMarkdown10 min read

AI-compiled by claude-haiku-5-5 on 2026-11-13, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.

In plain words

Satellite photos can be labelled by what covers the ground: forest, crops, rivers, housing and so on. Training a neural network for this from nothing needs many labelled images, and those are often scarce. This study takes two image networks that were already trained on a large general photo collection and swaps their final layer for a small new one that predicts the 10 land-cover classes.

Only the new layer is supposed to learn at first, but the published notebooks in practice train every layer. To keep training stable and cheap, the authors add a rule that stops training when progress stalls, a cap on the size of each gradient update, a cut in the learning rate when progress stalls, and flipped or rotated copies of the training images. The wider network gets the best accuracy in the paper, and the authors report it as higher than earlier published results on the same RGB data. Their abstract and discussion name different earlier results as the best one (see Pitfalls).

TL;DR

Fine-tune an ImageNet-pretrained VGG16 or Wide ResNet-50 on the RGB version of EuroSAT (10 classes, 27,000 patches, one 75/25 split), with Adam at a learning rate of 1e-4, batch size 64 and at most 25 epochs. Author-reported: Wide ResNet-50 with augmentation scores 99.17% and VGG16 with augmentation 98.55%. The notebooks use the same 25% split for early stopping and for picking the reported model, and their freezing call has no effect, so the whole network trains. Treat the numbers as optimistic.

Problem

The paper targets land use and land cover (LULC) classification from high-resolution satellite imagery. Low-level pixel features are not enough for scene semantics, and the task stays challenging §1. The authors also note that land-cover types with similar layouts get confused §5. Deep CNNs are strong here, but the authors state that they are tedious to train on small datasets §1. Their approach is to reuse weights learned on a large source task instead of training from scratch §1, §3. The experiments use only the RGB bands, and the paper's comparison is limited to RGB results §3.1, §5, tab. 1.

Method

The dataset is EuroSAT in its RGB form: 27,000 labelled, georeferenced patches from Sentinel-2, in 10 scene classes with 2,000 to 3,000 patches each. Patches are 64 × 64 pixels at 10 m §3.1. The authors split them 75/25 at random into 20,250 training and 6,750 held-out images §3.1. The code shuffles the file list with a fixed seed and cuts it at 75%, so the split is not stratified final_vgg16_98.55_DataAug.ipynb.

Each backbone is an ImageNet-pretrained network §3.2. The last layer is replaced by a fully connected layer, a ReLU, a dropout layer and a second fully connected layer with log-softmax output §3.2, fig. 2. The sizes 256 and 0.5 are only in the code final_vgg16_98.55_DataAug.ipynb. The training loss is categorical cross-entropy, optimised with Adam §3.2. The paper states no numbered equations or algorithms, so the steps below are a reading of the text and the code.

Pseudocode
# Training-image preprocessing  [§3.2] [§3.3.1]
# Input:  patch (3, 64, 64) RGB; output: tensor (3, 224, 224)
def train_transform(patch):
    # Resize to the 224 x 224 input size  [§3.2]
    image = resize(patch, height=224, width=224)
    # Flip horizontally and vertically, each with probability 0.5
    # [code: final_vgg16_98.55_DataAug.ipynb#L841-L843]
    if random() < 0.5:
        image = flip_horizontal(image)
    if random() < 0.5:
        image = flip_vertical(image)
    # Rotate by an angle drawn from plus or minus 20 degrees  [§3.3.1]
    # [code: final_vgg16_98.55_DataAug.ipynb#L842]
    image = rotate(image, max_degrees=20)
    # Scale pixel values to [0, 1]; no mean or std normalisation
    # [code: final_vgg16_98.55_DataAug.ipynb#L844]
    return to_tensor(image)                  # (3, 224, 224)
Pseudocode
# Fine-tuning loop  [§3.2] [§3.3.2] [§3.3.3] [§3.3.4]
# Input:  train_set (20,250 images), valid_set (6,750 images)
# Output: weights with the best validation accuracy
def fine_tune(model, train_set, valid_set):
    # Adam, learning rate 1e-4, no weight decay  [§3.3.4]
    # [code: final_vgg16_98.55_DataAug.ipynb#L1404-L1406]
    optimizer = adam(model.parameters(), lr=1e-4, weight_decay=0)
    # Divide the learning rate by 10 after 2 idle epochs  [§3.3.4]
    # [code: final_vgg16_98.55_DataAug.ipynb#L1178]
    scheduler = reduce_on_plateau(optimizer, factor=0.1, patience=2)
    best_val_loss = infinity
    best_val_acc = 0.0
    idle_epochs = 0
    # At most 25 epochs, batches of 64  [§3.2]
    for epoch in range(25):
        for images, labels in batches(train_set, size=64, shuffle=True):
            # The model outputs log-probabilities; see Pitfalls  [§3.2]
            # [code: final_vgg16_98.55_DataAug.ipynb#L965]
            loss = cross_entropy(model(images), labels)
            loss.backward()
            # Clip each gradient value to [-0.1, 0.1]  [§3.3.2]
            # [code: final_vgg16_98.55_DataAug.ipynb#L1193]
            clip_gradient_values(model.parameters(), 0.1)
            optimizer.step()
            optimizer.zero_grad()
        # The code passes the 25% test split here
        # [code: final_vgg16_98.55_DataAug.ipynb#L1899]
        val_loss, val_acc = evaluate(model, valid_set)
        # [code: final_vgg16_98.55_DataAug.ipynb#L1202-L1203]
        scheduler.step(val_loss)
        # Save the weights with the best validation accuracy
        # [code: final_vgg16_98.55_DataAug.ipynb#L1207-L1209]
        if val_acc > best_val_acc:
            best_val_acc = val_acc
            save(model, "best_acc")
        # Track the lowest validation loss  [§3.3.3]
        # [code: final_vgg16_98.55_DataAug.ipynb#L1210-L1216]
        if val_loss < best_val_loss:
            best_val_loss = val_loss
            idle_epochs = 0
        else:
            idle_epochs += 1
            # Stop after more than 5 idle epochs  [§4.1]
            if idle_epochs > 5:
                break
    # Reload the best-accuracy weights for reporting
    # [code: final_vgg16_98.55_DataAug.ipynb#L2099]
    load(model, "best_acc")

Augmentation is applied to training images only. Test images get the resize and the scaling and nothing else final_vgg16_98.55_DataAug.ipynb. The no-augmentation runs comment out the three augmentation lines final_vgg16_98.13_noDataAug.ipynb.

Hyperparameters

NameValueWhereNotes
Input size224 × 224, RGB§3.2 final_vgg16_98.55_DataAug.ipynbsource patches are 64 × 64 §3.1
Batch size64§3.1 §3.2 final_vgg16_98.55_DataAug.ipynbshuffled for training only
Max epochs25§3.2 final_vgg16_98.55_DataAug.ipynbearly stopping can end earlier
OptimiserAdam§3.2 final_vgg16_98.55_DataAug.ipynbbetas and epsilon not stated; code uses library defaults
Max learning rate1e-4§3.3.4 final_vgg16_98.55_DataAug.ipynb
Weight decay0final_vgg16_98.55_DataAug.ipynbnot stated in paper
LR schedulereduce on plateau of validation loss, factor 0.1, patience 2§3.3.4 final_vgg16_98.55_DataAug.ipynbthreshold, cooldown and minimum LR not stated; code uses library defaults
Gradient clippingvalue clip at 0.1 (code); max norm 0.1 (paper)§3.3.2 final_vgg16_98.55_DataAug.ipynbthe two differ; see Paper vs code
Early stoppingpatience 5 (paper); stops after 6 idle epochs (code)§4.1 final_vgg16_98.55_DataAug.ipynbmonitored quantity: validation loss
Losscategorical cross-entropy on log-probabilities§3.2 final_vgg16_98.55_DataAug.ipynb
Head width256, ReLUfinal_vgg16_98.55_DataAug.ipynbnot stated in text; see fig. 2
Head dropout0.5final_vgg16_98.55_DataAug.ipynbnot stated in text
Output classes10§3.1
Pretrained initImageNet weights, torchvision§3.2 final_vgg16_98.55_DataAug.ipynbWide ResNet-50 code uses wide_resnet50_2 final_wide_resnet50_99.17_DataAug.ipynb
Augmentationhorizontal flip p=0.5, vertical flip p=0.5, rotation ±20°, resize§3.3.1 final_vgg16_98.55_DataAug.ipynbGaussian blur is named in the paper but absent from the code
Normalisationscale to [0, 1] onlyfinal_vgg16_98.55_DataAug.ipynbpaper says inputs are normalised §3.2; no mean or std step
Splitrandom 75/25, 20,250 / 6,750§3.1 final_vgg16_98.55_DataAug.ipynbshuffle seed 48; torch seed 1021 [code#L185]
Layer freezing"initial layers" frozen §3.2; "top layers" frozen §4.1final_vgg16_98.55_DataAug.ipynbthe code does not freeze; see Paper vs code
Hyperparameter search"finalised by preliminary experiments"§4the search is not described

Results

Author-reported. Setup: EuroSAT RGB, one 75/25 split, PyTorch, NVIDIA Tesla P100 GPUs on Kaggle §3. Baselines are prior RGB results listed in tab. 1.

Paper's experimental results tab. 2. The paper's text calls these "validation" accuracies §4.1, §4.2 and "test data accuracy" §5; the notebooks evaluate them on the same 25% split.

BackboneAugmentedEpoch countDurationPer-epoch durationScore
VGG16no181h 47min 24s5.9 min98.14%
VGG16yes212h 4min 12s6.1 min98.55%
Wide ResNet-50no141h 19min 48s5.5 min99.04%
Wide ResNet-50yes232h 7min 53s5.6 min99.17%

Prior RGB results listed in the paper tab. 1, as reported by those papers:

SourceModelAccuracy
Helber et al.ResNet-5098.57%
Li et al.DDRL-AM98.74%
SonuneVGG1997.66%
Yassine et al.CNN, 13 bands plus indices (not RGB)99.58%

The Wide ResNet-50 confusion matrix fig. 6b shows Forest and Sea/Lake at 99.86% and Permanent Crop lowest at 97.39% §4.2. The text does not say which run that matrix comes from.

Paper vs code

Official code: the first author's repository, linked from the paper §5. It holds four Jupyter notebooks (one per Table 2 row) and a one-line README, at commit 61c397d94acc49d014467f4462f076ac1d19dc14. It has no LICENSE file, so nothing is quoted from it here.

Differences, each with both citations:

  • Frozen layers. Paper: the initial layers are frozen §3.2; in §4.1 the top layers are frozen. The two statements disagree. Code: model.freeze() is called before training final_vgg16_98.55_DataAug.ipynb, but it sets param.require_grad (missing "u"), not requires_grad final_vgg16_98.55_DataAug.ipynb. No parameter is frozen, and the optimiser is built on all parameters final_vgg16_98.55_DataAug.ipynb. The same typo appears in all four notebooks.
  • Gradient clipping. Paper: the norm over all gradients is capped at 0.1 §3.3.2. Code: each gradient value is clamped to ±0.1 with clip_grad_value_ final_vgg16_98.55_DataAug.ipynb. These are different operations.
  • Augmentation. Paper: Gaussian blurring is among the augmentations §3.3.1. Code: horizontal flip, vertical flip, rotation and resize only final_vgg16_98.55_DataAug.ipynb.
  • Early stopping. Paper: patience of 5 §4.1; the last best parameters are used §3.3.3. Code: stops when the idle count is greater than 5, i.e. after six consecutive epochs without a new lowest validation loss final_vgg16_98.55_DataAug.ipynb. Code keeps two checkpoints, one for lowest loss and one for highest accuracy final_vgg16_98.55_DataAug.ipynb; the reported model is the highest-accuracy one final_vgg16_98.55_DataAug.ipynb.
  • Validation set. Paper: a 75/25 split with training and testing, reported as validation accuracy §4 and test accuracy §5. Code: fit receives the 25% test split as its validation loader final_vgg16_98.55_DataAug.ipynb. The scheduler, early stopping and checkpoint choice all use it, and the reported accuracy comes from the same split final_vgg16_98.55_DataAug.ipynb.
  • Repeated splits. Paper: five different train/test sets were used for evaluation §4. Code: one split, fixed by seed 48 final_vgg16_98.55_DataAug.ipynb. Table 2 shows one number per row; no spread is given.
  • Epoch counts. Paper: 18, 21, 14 and 23 epochs tab. 2. The logs print epoch indices 0 to 18, 0 to 21, 0 to 14 and 0 to 23 final_vgg16_98.13_noDataAug.ipynb. The paper's numbers are the last 0-based index, so each run had one more epoch than Table 2 shows.
  • VGG16 without augmentation. Paper: 98.14% tab. 2. Code: the best validation accuracy is 0.98143 final_vgg16_98.13_noDataAug.ipynb; the reloaded checkpoint scores 98.13% on the same split final_vgg16_98.13_noDataAug.ipynb. The other three rows match the printed test accuracies: 98.55% final_vgg16_98.55_DataAug.ipynb, 99.04% final_wide_resnet50_99.04_noDataAug.ipynb, 99.17% final_wide_resnet50_99.17_DataAug.ipynb.
  • Input normalisation. Paper: inputs are normalised in mini-batches §3.2. Code: scaling to [0, 1] only, with no mean or std step final_vgg16_98.55_DataAug.ipynb.
  • Backbone name. Paper: "Wide ResNet-50" §3.2, but the introduction calls it "Wide Residual Networks-50 (ResNet-50)" §1. Code: torchvision wide_resnet50_2, which is the width-2 variant final_wide_resnet50_99.17_DataAug.ipynb.
  • Printed accuracy on all data. The notebooks also print accuracy on all 27,000 images, including training images final_vgg16_98.55_DataAug.ipynb. The paper does not report these values.

Matches: Adam, max learning rate 1e-4, batch 64, 25 epochs, the reduce-on-plateau settings (factor 0.1, patience 2), ImageNet initialisation and a 224 × 224 input. No discrepancies found in these.

Pitfalls

  • The reported number is selected on the test split. Early stopping, the learning-rate schedule and the checkpoint all use the 25% split that is reported. There is no untouched test set. The numbers are likely optimistic, and they are not comparable with a properly held-out result. For your own use, carve out a third split before any selection.
  • Freezing is ambiguous and not implemented. The paper says initial layers in §3.2 and top layers in §4.1. The code trains every parameter. To freeze, set requires_grad = False on the layers you choose, and decide which layers the paper means.
  • Norm versus value clipping. The paper's norm cap and the code's value clamp give different updates. Pick one and state which.
  • Early-stopping off-by-one. > 5 stops after six idle epochs, not five. Use >= 5 if you want to match "patience of 5" in the usual sense.
  • Double log-softmax. The head ends in log-softmax and the loss is cross-entropy, which applies log-softmax again. On log-probabilities the second log-softmax is an identity, so the loss equals the negative log-likelihood. Do not add a second softmax. If you rewrite the loss as NLL on the head output, the result is the same.
  • Unstated and library-default settings. Adam betas and epsilon, the scheduler's threshold, cooldown and minimum LR, and the head width and dropout (the last two are in the code only) are not in the text. The code uses library defaults for the first three.
  • Single run, no variance. Every row is one run on one split. The paper ranks the models on gaps of 0.01 to 0.6 points §4, §5 with no spread reported. Treat those gaps as unmeasured.
  • Hyperparameter search is undocumented. "Finalised by preliminary experiments" §4 does not say what was tried or on which data.
  • Learning-rate reductions cannot be counted from the logs. The paper says the rate changed three times §4.1, §4.2. The logs print the rate with four decimals, so after the first cut it shows as 0.0000. Those three steps cannot be verified from the logs.
  • Discrepant earlier-result figures. The abstract puts the previous best at 98.57%; the discussion puts it at 98.74% §5. Table 1 lists 98.74% as the best RGB result tab. 1. The "state-of-the-art" claim §5 is for RGB only. The 99.58% row is not RGB.
  • Dataset source. The notebooks read a Kaggle copy of the dataset from a fixed path, JPEG files named by class final_vgg16_98.55_DataAug.ipynb. The code does not show that this copy is the RGB release the paper describes.
  • Few controlled comparisons. The only controlled comparison is augmentation on and off §4. Gradient clipping, early stopping and the learning-rate schedule are never ablated, so their individual effects are unknown.
  • Time figures are hardware-specific. The per-epoch times come from the authors' P100 setup §3, tab. 2.
  • Per-class figures. The class-level numbers §4.2 come from a confusion matrix of unstated run and split. Do not compare them across rows.

Lineage

  • Builds on: VGG (arXiv:1409.1556), Wide Residual Networks (arXiv:1605.07146), Adam (arXiv:1412.6980) and gradient clipping as analysed by Zhang et al. (arXiv:1905.11881), as listed in the paper's references §3.2, §3.3.2.
  • Compared against: the EuroSAT RGB results of Helber et al. (ResNet-50, GoogleNet), Li et al. (DDRL-AM) and Sonune and Yassine et al. (CNN), as listed in tab. 1. The paper gives no arXiv ids for them.
  • Superseded by: not stated.

Source and license

Adapted from “Deep Transfer Learning for Land Use and Land Cover Classification: A Comparative Study” by Raoof Naushad, Tarunpreet Kaur, Ebrahim Ghaderpour (arXiv:2110.02580), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors. Code citations refer to https://github.com/raoofnaushad/EuroSAT_LULC at commit 61c397d94acc (none (no LICENSE file in repository)). Any quoted code is shown under that license.