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.
- Host: GitHub
- URL: https://github.com/krisrs1128/glacier_mapping
- Owner: krisrs1128
- Created: 2019-10-09T19:22:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-14T23:35:09.000Z (over 1 year ago)
- Last Synced: 2025-04-17T22:44:04.447Z (10 days ago)
- Language: Python
- Homepage:
- Size: 3.78 MB
- Stars: 37
- Watchers: 6
- Forks: 18
- Open Issues: 6
- Releases: 0
-
Metadata Files:
- Readme: README.md
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.csvwrite_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.yamlglacier_mapping.train.*
--> creates data/runs/run_name folder, containing logs/ with tensorboard logs and models/ with all checkpoints
Data Preprocessing:
- 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
- Transformation: For easy processing, we convert the input image and
labels into multi-dimensional numpy.npy
files. - 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
- 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. - Random Split: The final dataset is saved in three folders:
train/ test/ dev/
- Reshuffle: Shuffle the images and masks in the output directory
- Imputation: Given and input, we check for missing values (NaNs) and
replace with 0 - 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. - Normalization: We normalize the final dataset based on the means and
standard deviations calclualted.
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
- Name: Kris Sankaran
- Login: krisrs1128
- Email:
- Kind: user
- Description:
- Website: https://krisrs1128.github.io/LSLab/
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/2264333?u=f35d3f1b492e5c29185f47102772090f4d5b4aa7&v=4
- Repositories: 145
- Last ynced at: 2024-06-11T15:57:03.253Z
- Profile URL: https://github.com/krisrs1128
GitHub Events
Total
- Watch event: 5
- Issue comment event: 1
- Fork event: 2
Last Year
- Watch event: 5
- Issue comment event: 1
- Fork event: 2
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 | 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:
- icimod-glaciers.rbbzkd3wokluvivlwjrjvc42kf.xx.internal.cloudapp.net: 2
- beluga3.int.ets1.calculquebec.ca: 1
- beluga4.int.ets1.calculquebec.ca: 1
- blg9310.int.ets1.calculquebec.ca: 1
- blg4103.int.ets1.calculquebec.ca: 1
- miners.utep.edu: 1
- kris-nc6.04sy1p0aemkejihup3owefltof.xx.internal.cloudapp.net: 1
- bibek-icimod.ga3o0jzfn4keroxrasgvtnu2qg.bx.internal.cloudapp.net: 1
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
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
- 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
- ubuntu 18.04 build
Score: 6.594413459749779