- ๐ Overview
- ๐ฐ๏ธ Project Context
- ๐ง System Architecture
- ๐ Directory Structure
- ๐ฆ Dataset
- ๐ Pipeline Breakdown
- ๐ Results & Metrics
- ๐ง Model Details
- โ๏ธ Technical Requirements
- ๐ Usage
- ๐งพ Data Format
- ๐ ๏ธ Troubleshooting
- โ Best Practices
- ๐ Citation
This repository presents a reproducible Earth Observation (EO) and Deep Learning pipeline for automated land-cover classification using Sentinel-2 RGB image patches and ESA WorldCover 2021 data.
The system enables:
- Automated geospatial data filtering
- Raster-based ground-truth label generation
- Supervised CNN training using ResNet-18
- Quantitative land-use and environmental analysis
The project is framed as an AI-based Geospatial Audit of the Delhi Airshed, suitable for research labs, environmental agencies, and policy analytics.
This work demonstrates how satellite imagery + deep learning can be leveraged for urban land-use monitoring and environmental auditing.
Data Sources
- Sentinel-2 (10m resolution RGB imagery)
- ESA WorldCover 2021 land-cover raster
- Delhi-NCR administrative boundary (EPSG:4326)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Delhi-NCR AOI (GeoJSON) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Spatial Grid (60ร60 km) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Sentinel-2 RGB Image Chips โ
โ (128ร128 @ 10m resolution) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ESA WorldCover Raster (10m) โ
โ โ Mode-based Labeling โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Clean Labeled Dataset (CSV) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ResNet-18 CNN (PyTorch) โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Metrics: Accuracy, F1, CM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
/Earth_Observation_Pipeline/
โ
โโโ data/
โ โโโ delhi_ncr_region.geojson
โ โโโ delhi_ncr_grid.geojson
โ โโโ worldcover_bbox_delhi_ncr_2021.tif
โ โโโ rgb/ # Sentinel-2 image patches (128ร128)
โ โโโ image_coords.csv
โ โโโ imgs_within_grid.csv
โ โโโ labelled_images_clean.csv
โ
โโโ 01_grid_visualization.py
โโโ 02_label_extract_assignment.py
โโโ 03_train_test_split.py
โโโ 04_cnn_train_eval.py
โ
โโโ requirements.txt
โโโ README.md
Kaggle Dataset (Required): https://www.kaggle.com/datasets/rishabhsnip/earth-observation-delhi-airshed
Includes:
- Sentinel-2 RGB image patches
- Delhi-NCR shapefiles
- Image coordinate metadata
- Define AOI using Delhi-NCR boundary
- Generate a uniform 60 ร 60 km grid
- Filter Sentinel-2 images by grid intersection
Script: 01_grid_visualization.py
- Extract raster patches from ESA WorldCover
- Assign land-cover class using mode-based sampling
- Handle missing data and edge effects
Script: 02_label_extract_assignment.py
- Remove invalid labels
- Perform stratified train-test split
- Analyze class distribution
Script: 03_train_test_split.py
- CNN: ResNet-18
- Input: Sentinel-2 RGB chips
- Metrics: Accuracy, F1 Score, Confusion Matrix
Script: 04_cnn_train_eval.py
(Representative โ depends on training run)
- Overall Accuracy: ~75โ85%
- Macro F1 Score: ~0.72โ0.82
- Strong Performance: Urban, Vegetation, Water
- Challenges: Mixed land-cover and boundary regions
- Confusion Matrix
- Class-wise F1 Scores
- Correct vs Incorrect Prediction Visualizations
- Architecture: ResNet-18
- Framework: PyTorch
- Loss Function: Cross-Entropy
- Evaluation Metrics: Accuracy, F1 Score
- Python 3.8+
pip install geopandas numpy pandas rasterio shapely scipy \
matplotlib seaborn scikit-learn \
torch torchvision torchmetrics \
geemappython 01_grid_visualization.pypython 02_label_extract_assignment.pypython 03_train_test_split.pypython 04_cnn_train_eval.py| filename | lat | lon | label | class_str |
- Ensure all data paths are correct
- Run scripts in order
- Verify image presence in
rgb/
- Preserve intermediate outputs
- Validate class balance before training
- Track experiment configurations
Please cite the following if used in research or applications:
- ESA WorldCover 2021
- Copernicus Sentinel-2
- Relevant geospatial data providers
โญ If this repository helps your work, consider starring it!
