Welcome to the Singrauli Land-Use Land-Cover (LULC) Classification repository! This project leverages the power of Google Earth Engine (GEE), Classical Machine Learning, and Deep Convolutional Neural Networks (CNNs) to analyze and classify the landscape of the Singrauli district using Sentinel-2 satellite imagery.
This is the Updated Version 1 of the project, featuring refined CNN models (9x9 and 15x15 patch sizes), improved data pipelines, and a comprehensive accuracy assessment workflow.
- Project Overview
- Repository Structure
- Getting Started & Prerequisites
- Data Access
- Methodology
- Results
- Workflow Guide
- Contributors
Singrauli is a region known for its rich coal reserves and power plants. Monitoring its Land Use and Land Cover is crucial for environmental assessment and planning. This project aims to accurately classify the region into 6 distinct classes:
- Water 💧
- Agriculture 🌾
- Settlement 🏙️
- Mining ⛏️
- Barren/Scrubland 🍂
- Forest 🌳
We employ a multi-modal approach, comparing traditional Random Forest classifiers (implemented in GEE) against patch-based CNN models (implemented in Python/TensorFlow) that leverage spatial context.
.
├── 📁 Accuracy Assessment and Visualisation
│ ├── 📄 Accuracy_assessment.ipynb # Interactive tool for ground truth validation
│ ├── 📄 model_accuracy_report.docx # Generated report
│ └── 📄 reference_data.csv # Ground truth points
├── 📁 CNN_15*15 # CNN Model (15x15 Input)
│ ├── 📄 cnn_training_15.ipynb # Training notebook
│ ├── 📄 cnn-prediction-15.ipynb # Prediction notebook
│ └── 📁 model/ # Saved .keras model and scalers
├── 📁 CNN_9*9 # CNN Model (9x9 Input)
│ ├── 📄 cnn_training_9.ipynb # Training notebook
│ ├── 📄 cnn-prediction-9.ipynb # Prediction notebook
│ └── 📁 model/ # Saved .keras model and scalers
├── 📁 Data
│ ├── 📁 CNN Patch Data # Extraction scripts & patch info
│ │ ├── 📄 Data_Extraction.ipynb # Script to create .npz from GeoTIFF
│ │ └── 📄 readme.md # Data download links
│ └── 📁 CSV format # Tabular data (train/test splits)
├── 📁 Google Earth Engine Code Editor
│ ├── 📄 Random_Forest_LULC.js # Main GEE script for RF classification
│ └── 📄 LULC_comparison.js # GEE script for comparing results
├── 📁 Results
│ ├── 📁 Classified Images # Final GeoTIFF outputs
│ └── 📁 Comparison Results # Charts and area statistics
└── 📄 README.md # Project documentation
The Python notebooks in this repository are optimized for Google Colab. They assume data is mounted via Google Drive. If running locally, you will need to adjust file paths and ensure the following libraries are installed:
numpy,pandas,matplotlib,seabornscikit-learntensorflow(for CNN models)rasterio(for geospatial image handling)folium,ipywidgets(for accuracy assessment maps)
Clone this repository:
git clone https://github.com/your-username/Singrauli-LULC.git
cd Singrauli-LULCDue to GitHub's file size limits, the high-resolution satellite imagery and pre-processed training datasets (patches) are hosted externally.
Internship_project) to run the notebooks seamlessly.
| File Asset | Description | Download Link |
|---|---|---|
Singrauli_Merged_Image.tif |
(Input) Base Sentinel-2 composite image (11 bands) used for patch extraction. | Download from Google Drive |
cnn_prepared_patches_9.npz |
(Output) Pre-processed 9x9 pixel image patches with labels. | Download from Google Drive |
cnn_prepared_patches_15.npz |
(Output) Pre-processed 15x15 pixel image patches with labels. | Download from Google Drive |
- Script:
Google Earth Engine Code Editor/Random_Forest_LULC.js - Process: Acquires Sentinel-2 imagery, computes indices (NDVI, NDWI, etc.), and runs a Random Forest classifier directly on the cloud.
- Output: Pixel-based classification.
- Architecture: Custom Sequential CNNs with varying input patch sizes (9x9 and 15x15) to capture different scales of spatial context.
- Process:
- Extract patches around labeled points.
- Train CNNs to classify the center pixel based on the surrounding patch.
- Performance: CNNs generally offer smoother classification and reduce "salt-and-pepper" noise compared to pixel-based RF.
Final outputs are stored in the Results/ directory:
- Classified Images: GeoTIFFs for RF, CNN-9, and CNN-15 predictions.
- Comparison: Area statistics (
LULC_class_area.csv) and visual comparisons showing the distribution of classes across different models.
Follow this step-by-step guide to reproduce the project results:
- Open the
Google Earth Engine Code Editor/Random_Forest_LULC.jsscript in the GEE Code Editor. - Run the script to process Sentinel-2 data.
- Export the Raw Composite Image (11 bands) and the Labeled Point Data (CSV) to your Google Drive.
- Open
Data/CNN Patch Data/Data_Extraction.ipynbin Google Colab. - Mount your Google Drive containing the exported GEE image and CSV.
- Run the notebook to extract 9x9 and 15x15 pixel patches.
- Output: This will generate
.npzfiles (e.g.,cnn_prepared_patches_9.npz) saved to your Drive.
- Navigate to
CNN_9*9/orCNN_15*15/. - Open
cnn_training_9.ipynb(or the 15x15 equivalent). - Ensure the path to the
.npzfile matches your Drive location. - Run all cells to train the model. The notebook handles data splitting, normalization, training, and saving the model (
.keras) and scaler (.joblib).
- Open
cnn-prediction-9.ipynb. - Load the saved model and scaler.
- Run the prediction on the full satellite image (or test set) to generate the final Classified LULC Map.
- Open
Accuracy Assessment and Visualisation/Accuracy_assessment.ipynb. - Load a classified image (RF, CNN-9, or CNN-15).
- Use the interactive widget to generate stratified random points and validate them against high-resolution basemaps.
- Output: The notebook calculates Confusion Matrices, Kappa Statistics, and F1-Scores, generating a downloadable report (
model_accuracy_report.docx).
- Data Science & Modeling
- Remote Sensing Specialist
Happy Mapping! 🗺️