← Back to homepage

CNNs

On this page I show the convolutional neural networks I trained.

Demo Video

Image Recognition Model (ResNet50)

This model recognises satellite images and classifies them into 10 different categories using a ResNet50 architecture.

Research and Planning

A. Dataset Analysis

Content: The EuroSAT dataset consists of RGB satellite images aimed at "Land use" and "Land cover" classification.

Classes: There are 10 unique classes: AnnualCrop, Forest, HerbaceousVegetation, Highway, Industrial, Pasture, PermanentCrop, Residential, River and SeaLake.

Balance and Size: The dataset contains 27,000 images in total, perfectly distributed across the classes (2,700 images per class). This balance is ideal, as we don't need any techniques to handle class imbalance.

Resolution and Resizing: The original images are 64x64 pixels. Since most standard pretrained models (such as ResNet) are trained on ImageNet and expect a 224x224 pixel input, we upscale the images during preprocessing.

B. Research for Preprocessing & Augmentation

Invariance and Augmentation: Satellite images are highly rotation-invariant; a forest is still a forest, whatever its orientation. This is unlike object detection (such as cars), where orientation is crucial. Based on this, we apply "more aggressive" data augmentation to make the model more robust:

  • RandomHorizontalFlip & RandomVerticalFlip: Both make sense given the bird's-eye view.
  • RandomRotation: Rotations of 0, 90, 180 and 270 degrees.

Normalisation: To make effective use of transfer learning, the pixel values have to be normalised using the mean and standard deviation of the original ImageNet dataset.

Data Split: The dataset already comes with CSV files for the train, test and validation sets, which we keep for consistent evaluation.

C. Model Selection and Justification

Choice: We chose the ResNet50 architecture as the pretrained model.

Justification: For the selection we researched many different architectures, from established names to less conventional options. I looked at the VGG family (VGG16, VGG19), GoogLeNet (Inception), several ResNet variants (18, 34, 50, 101), DenseNet, MobileNet and EfficientNet. Newer architectures such as ConvNeXt and Vision Transformers (ViT) were also considered. For each model I evaluated performance, number of parameters, training speed and suitability for transfer learning.

In the end, ResNet50 offers the best balance for this project:

  • Skip Connections: Using "residual blocks" with skip connections counters the vanishing gradient problem and makes deeper networks easier to train.
  • Comparison: VGG is computationally too heavy and slow. EfficientNet is very efficient but has a more complex scaling method. Newer models such as ViT often need much more data or more complex tuning. ResNet50 is a proven standard that combines robustness with manageable complexity and excellent documentation.

D. Evaluation Metrics

Primary Metric: Accuracy. Given the perfectly balanced dataset, accuracy is the most representative measure of success.

Loss Function: CrossEntropyLoss, the standard loss function for multi-class classification.

Analysis: We use a Confusion Matrix to gain deeper insight into specific classification errors (for example, confusing rivers with highways).