A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Glacier Mapping From Satellite Imagery

Use computer vision to automatically segment debris and ice glaciers from satellite images.
https://github.com/krisrs1128/glacier_mapping

Category: Cryosphere
Sub Category: Glacier and Ice Sheets

Keywords from Contributors

measur transforms archiving animals conversion observation optimize projection compose generic

Last synced: about 9 hours ago
JSON representation

Repository metadata

Mapping glaciers in the Hindu Kush Himalaya, in partnership with ICIMOD.

README.md

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,

  • conf/masking_paths.yaml: Says how to burn shapefiles into image masks.
  • conf/postprocess.yaml: Says how to filter and transform sliced images.
  • conf/train.yaml: Specifies training options.

At each step, the following intermediate files are created,

  • generate_masks() --> writes mask_{id}.npy's and mask_metadata.csv
  • write_pair_slices() --> writes slice_{tiff_id}img{slice_id}, slice_{tiff_id}label{slice_id}, and slice_0-100.geojson (depending on which lines from mask_metadata are sliced)
  • postproces() --> copies slices*npy from previous step into train/, dev/, test/ folders, and writes mean and standard deviations to path specified in postprocess.yaml
  • glacier_mapping.train.* --> creates data/runs/run_name folder, containing logs/ with tensorboard logs and models/ with all checkpoints

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

  • (2000, Nepal): Polygons older/newer than 2 years from 2000 are filtered out. Original collection contains few polygons from 1990s
  • (2000, Bhutan): Used as it's
  • (2010, Nepal): Polygons older/newer than 2 years from 2010 are filtered out. Original collection is for 1980-2010
  • (2010, Bhutan): Used as it's

License

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


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 5 days ago

Total Commits: 947
Total Committers: 17
Avg Commits per committer: 55.706
Development Distribution Score (DDS): 0.427

Commits in past year: 2
Committers in past year: 2
Avg Commits per committer in past year: 1.0
Development Distribution Score (DDS) in past year: 0.5

Name Email Commits
Kris Sankaran s****s@g****m 543
Shimaa s****a@g****m 242
ak3ra a****n@g****m 54
Anthony Ortiz a****z@g****m 21
Aryal Bibek b****7@g****m 19
Ubuntu b****l@b****t 16
Ubuntu k****s@k****t 13
AryalBibek b****l@m****u 7
Kris Sankaran k****s@K****l 7
Kris Sankaran k****s@i****t 6
Aryal Bibek a****l@i****t 4
Kris Sankaran s****k@b****a 4
Kris Sankaran s****k@b****a 4
dependabot[bot] 4****] 3
Shimaa Baraka s****a@b****a 2
Yassine Hammoud 8****d 1
Kris Sankaran s****k@b****a 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 9
Total pull requests: 87
Average time to close issues: 16 days
Average time to close pull requests: 8 days
Total issue authors: 3
Total pull request authors: 6
Average comments per issue: 1.22
Average comments per pull request: 0.13
Merged pull request: 81
Bot issues: 0
Bot pull requests: 7

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/krisrs1128/glacier_mapping

Top Issue Authors

  • cvhabitat (5)
  • krisrs1128 (3)
  • Aryal007 (1)

Top Pull Request Authors

  • krisrs1128 (58)
  • Aryal007 (10)
  • Sh-imaa (8)
  • dependabot[bot] (7)
  • ak3ra (3)
  • yassinehammoud (1)

Top Issue Labels

Top Pull Request Labels

  • dependencies (7)

Dependencies

requirements.txt pypi
  • Beaker ==1.11.0
  • Shapely ==1.7.0
  • addict ==2.2.1
  • bottle ==0.12.20
  • cheroot ==8.4.2
  • cmake >=3.14.2
  • fiona ==1.8.13
  • gdal2tiles ==0.1.7
  • geopandas ==0.8.1
  • joblib ==0.16.0
  • opencv-python >=4.4
  • pandas ==1.0.5
  • pybind11 *
  • pyyaml >4.2b1
  • rasterio ==1.1.5
  • rpyc ==4.1.5
  • scikit-build >=0.11.1
  • scikit-image ==0.16.2
  • torch ==1.6.0
  • torchvision ==0.7.0
  • tornado ==5.1.0
  • utm ==0.5.0
scripts/Dockerfile docker
  • ubuntu 18.04 build
setup.py pypi

Score: 6.594413459749779