Home

Awesome

Glacier Mapping From Satellite Imagery

Overview

The goal of this project is to use computer vision to automatically segment debris and ice glaciers from satellite images

Requirements are specified in requirements.txt. The full package sources is available in the glacier_mapping directory. Raw training data are Landsat 7 tiff images from the Hindu-Kush-Himalayan region. We consider the region of Bhutan and Nepal. Shapefile labels of the glaciers are provided by ICIMOD

Pipeline

Overview

The full preprocessing and training can be viewed at https://colab.research.google.com/drive/1ZkDtLB_2oQpSFDejKZ4YQ5MXW4c531R6?usp=sharing Besides the raw tiffs and shapefiles, the required inputs are,

At each step, the following intermediate files are created,

pipeline

Data Preprocessing:

  1. Slicing: We slice the input tiffs into 512x512 tiles. The resulting tiles along with corresponding shapefile labels are stored. Metadata of the slices are stored in a geojson file" slicemetadata.geojson To slice, run: python3 src/slice.py
  2. Transformation: For easy processing, we convert the input image and labels into multi-dimensional numpy .npy files.
  3. Masking: The input shapefiles are transformed into masks. The masks are needed for use as labels. This involves transforming the label as multi-channel images with each channel representing a label class ie. 0 - Glacier, 1 debris etc To run transformation and masking: python3 src/mask.py

Data PostProcessing

  1. Filtering: Returns the paths for pairs passing the filter criteria for a specific channel. Here we filter by the percentage of 1's in the filter channel.
  2. Random Split: The final dataset is saved in three folders: train/ test/ dev/
  3. Reshuffle: Shuffle the images and masks in the output directory
  4. Imputation: Given and input, we check for missing values (NaNs) and replace with 0
  5. Generate stats: Generate statistics of the input image channels: returns a dictionary with keys for means and standard deviations accross the channels in input images.
  6. Normalization: We normalize the final dataset based on the means and standard deviations calclualted.

Image-Mask Pair

Model Training

Model: Unet with dropout (default dropout rate is 0.2).

vector data sources

Labels : ICIMOD

License

Code open source for anyone to use as it's under MIT License