Skip to content

NoInk02/NRCC251050

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Cloud and Shadow Segmentation using Deep Learning

This project implements a two-stage deep learning pipeline to segment clouds and shadows from satellite imagery using TOA reflectance and metadata. The models are trained on LISS-IV data.


πŸ“‚ Project Structure

β”œβ”€β”€ inference_code.ipynb        # Main inference pipeline
β”œβ”€β”€ Requirements.txt         # Dependencies
β”œβ”€β”€ Training_Files/              # Labelling of cloud mask and training scripts for ResUNet and U-Net
β”œβ”€β”€ masks/                  # Predicted masks on test dataset
β”œβ”€β”€ Report.pdf             # Methodology and analysis
β”œβ”€β”€ NRCC251050_Inference_Training_Results.csvΒ Β # Training log (losses, metrics)
β”œβ”€β”€ Earth_Sun_Distance.xlsx             # Earth-Sun distance values for TOA reflectance computation               └── Training_labeled_data/         # Dataset used to train models


🧠 Models Used

Task Model Input Channels Output Classes
Cloud Segmentation ResUNet (ResNet34 encoder) TOA Bands (B2, B3, B4) 2 (Clear, Cloud)
Shadow Segmentation Custom U-Net TOA Bands + Cloud Mask + Sun Elevation 2 (Clear, Shadow)

πŸ“₯ Download Trained Models

You can download the trained models (ResUNet for cloud segmentation and U-Net for shadow segmentation) from the link below:

πŸ”— Download Trained Models from Google Drive


πŸ› οΈ Requirements

Create a new python environment(python=3.10). Navigate to the downloaded folder where requirements.txt is present.

Install dependencies using:

pip install -r requirements.txt

πŸš€ Inference Guide

  1. Place your test folder containing B2, B3, B4 bands and metadata file.
  2. Update paths inside inference_code.ipynb:
    • Band paths (e.g., B2.tif, B3.tif, B4.tif)
    • Metadata text file path
    • Cloud model path (.pth)
    • Shadow model path (.pth)
  3. Run all cells in the notebook to get:
    • Georeferenced mask.tif with values:
      0 = clear, 1 = cloud, 2 = shadow
    • Optional: cloud and shadow shapefiles

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published