Skip to content

Repository files navigation

🌍 Advanced Land Use Detection & Classification (EuroSAT)

Python PyTorch License Status

📖 Overview

This project implements an advanced intelligent system for Land Use and Land Cover (LULC) classification using the EuroSAT Sentinel-2 satellite dataset.

The study conducts a rigorous comparative analysis between RGB (3-band) and Multispectral (13-band) imagery across distinct paradigms:

  1. Classical Machine Learning: SVM, Random Forest, KNN.
  2. Deep Learning (CNNs): Custom Simple CNN, ResNet50 (Transfer Learning), and ConvNeXt.
  3. Transformers: Vision Transformer (ViT) feature extraction.

Key Achievement: The system achieved a peak accuracy of 97.00% using Multispectral ResNet50 and demonstrated that ConvNeXt offers superior robustness to sensor degradation (blur/low resolution).


📑 Table of Contents


🛰 Dataset

The project utilizes the EuroSAT dataset based on Sentinel-2 satellite imagery.

  • Total Images: 27,000
  • Classes (10): Annual Crop, Forest, Herbaceous Vegetation, Highway, Industrial, Pasture, Permanent Crop, Residential, River, Sea/Lake.
  • Spatial Resolution: 10m - 60m per pixel.
  • Modalities Used:
    • RGB: Standard visible spectrum (Bands 4, 3, 2).
    • Multispectral: Full 13-band spectrum including Near-Infrared (NIR) and Short-Wave Infrared (SWIR).

⚙️ Methodology

1. Preprocessing

  • RGB: Gaussian Blur ($3\times3$) for noise removal, CLAHE for contrast enhancement, and ImageNet Normalization.
  • Multispectral: Band-wise Min-Max scaling to $[0, 1]$.

2. Feature Extraction & Architectures

  • Classical: GLCM (Texture), LBP, and Spectral Statistics (Mean/Std/NDVI).
  • Simple CNN: A custom 3-layer CNN trained from scratch (Lightweight).
  • ResNet50: Transfer learning from ImageNet, adapted for 13-channel input.
  • ConvNeXt: Modern CNN architecture using large ($7\times7$) kernels to mimic Vision Transformers.
  • ViT (Vision Transformer): Patch-based feature extraction ($16\times16$ patches).

💻 Installation

  1. Clone the repository:

    git clone [https://github.com/your-username/EuroSAT-Land-Use-Classification.git](https://github.com/your-username/EuroSAT-Land-Use-Classification.git)
    cd EuroSAT-Land-Use-Classification
  2. Install dependencies:

    pip install -r requirements.txt

    Key libraries: torch, torchvision, rasterio, scikit-learn, seaborn, albumentations.


🚀 Usage

I used Google Colab with T4 GPUs! The jupyter notebooks are ready to use in that environment


📊 Results & Performance

We evaluated models based on Accuracy, F1-Score, and Inference Efficiency.

Architecture Modality Accuracy F1-Score Verdict
ResNet50 Multispectral 97.00% 0.97 🏆 Best Overall
Simple CNN Multispectral 94.00% 0.93 🚀 Best Efficiency
ConvNeXt RGB 92.00% 0.92 Strong RGB Baseline
ViT + SVM RGB 96.00% 0.96 Excellent Feature Extractor
Classical SVM Multispectral 86.00% 0.86 Good Baseline
KNN Deep Features 63.00% 0.60 Poor (Curse of Dimensionality)

Key Findings

  • The Spectral Leap: Adding NIR/SWIR bands improved accuracy by ~15% for vegetation classes (Forest vs. Pasture).
  • Small Models Win: The custom Simple CNN (trained from scratch) achieved 94% on Multispectral data, outperforming complex hybrids like ViT+RF (62%).

🛡 Robustness Analysis

We stress-tested models against synthetic degradations to simulate real-world sensor issues.

Degradation Type ResNet50 (MS) ConvNeXt (MS) ViT+SVM (RGB)
Baseline Accuracy 97.26% 92.00% 95.80%
Gaussian Noise 11.19% (Fail) 55.06% 98.50% (Robust)
Cloud Shadows 82.37% (Pass) 65.30% 3.90% (Fail)
Blur (Low Res) 53.89% (Fail) 91.61% (Robust) 28.10% (Fail)

Insight: ConvNeXt is the best choice for low-quality/blurry satellite feeds, while ViT is immune to sensor noise.


📈 Visualizations (EDA)

(Placeholders for your generated plots - add these to an /images folder)

  • Spectral Signatures: Visual proof that Vegetation (Band 8 spike) is separable from Urban areas.
  • t-SNE Clustering: 2D projection showing class separability.
  • Confusion Matrices: Detailed error analysis per class.

🔮 Future Work

  1. SatMAE (Masked Autoencoders): Implementing self-supervised learning to reconstruct masked patches for better physics understanding.
  2. Ensembling: Combining ResNet50 (Spatial Expert) and Simple MS-CNN (Spectral Expert) to maximize robustness.
  3. Dimensionality Reduction: Applying PCA to Deep Features before passing them to Classical Classifiers (SVM/KNN).

📜 License

This project is licensed under the MIT License.


Releases

Packages

Used by

Contributors

Languages