geo-deep-learning
Deep learning applied to georeferenced datasets
Science Score: 54.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.9%) to scientific vocabulary
Keywords
Repository
Deep learning applied to georeferenced datasets
Basic Info
- Host: GitHub
- Owner: NRCan
- License: mit
- Language: Python
- Default Branch: develop
- Homepage: https://geo-deep-learning.readthedocs.io/en/latest/
- Size: 119 MB
Statistics
- Stars: 170
- Watchers: 15
- Forks: 54
- Open Issues: 50
- Releases: 3
Topics
Metadata Files
README.md

About
The Geo-Deep-Learning project stems from an initiative at NRCan's CCMEO. Its aim is to allow using Convolutional Neural Networks (CNN) with georeferenced datasets.
In Geo-Deep-Learning, the learning process comprises two broad stages: tiling and training, followed by inference, which makes use of a trained model to make new predictions on unseen imagery.
Requirement
This project comprises a set of commands to be run at a shell command prompt. Examples used here are for a bash shell in an Ubuntu GNU/Linux environment.
- Python 3.10, see the full list of dependencies in environment.yml
- hydra
- mlflow
- miniconda (highly recommended)
- nvidia GPU (highly recommended)
Installation
Miniconda is suggested as the package manager for GDL. However, users are advised to switch to libmamba as conda's default solver or to directly use mamba instead of conda if they are facing extended installation time or other issues. Additional problems are grouped in the troubleshooting section. If issues persist, users are encouraged to open a new issue for assistance.
Tested on Ubuntu 20.04, Windows 10 and WSL 2.
Quickstart with conda
To execute scripts in this project, first create and activate your python environment with the following commands:
shell
$ conda env create -f environment.yml
$ conda activate geo_deep_env
Change conda's default solver for faster install (Optional)
shell
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
Troubleshooting
- ImportError: /lib/x8664-linux-gnu/libstdc++.so.6: version `GLIBCXX3.4.29' not found
- Export path to library or set it permenantly in your .bashrc file (example with conda) :
bash export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
- Export path to library or set it permenantly in your .bashrc file (example with conda) :
How to use?
This is an example of how to run GDL with hydra in simple steps with the massachusetts buildings dataset in the tests/data/ folder, for segmentation on buildings:
Clone this github repo.
shell (geo_deep_env) $ git clone https://github.com/NRCan/geo-deep-learning.git (geo_deep_env) $ cd geo-deep-learningRun the wanted script (for segmentation). ```shell
Creating the patches from the raw data
(geodeepenv) $ python GDL.py mode=tiling
Training the neural network
(geodeepenv) $ python GDL.py mode=train
Inference on the data
(geodeepenv) $ python GDL.py mode=inference ```
This example runs with a default configuration ./config/gdl_config_template.yaml. For further examples on configuration options see the configuration documentation.
To see the different mode and task available go see the documentation here.
New task
If you want to introduce a new task like object detection, you only need to add the code in the main folder and name it object_detection_tiling.py for example.
The principle is to name the code like {task}_{mode}.py and the GDL.py will deal with the rest.
To run it, you will need to add a new parameter in the command line python GDL.py mode=tiling task=object_detection or change the parameter inside the ./config/gdl_config_template.yaml.
Contributing
We welcome all forms of user contributions including feature requests, bug reports, code, documentation requests, and code. Simply open an issue in the tracker.
If you think you're not skilled or experienced enough to contribute, this is not TRUE! Don't be affraid to help us, every one start somewhere, and it will be our pleasure to help you to help us.
You can find more information on how to create a good issue on a GitHub project Here.
After creating an issue, you can start working on the solution. When you have finish working on your code, it's time for the PR. All the information on how to create a good PR on a GitHub project Here.
Citing Geo Deep Learning
Citations help us justify the effort that goes into building and maintaining this project. If you used Geo Deep Learning for your research, please consider citing us.
@misc{NRCAN:2020,
Author = {Natural Resources Canada, Government of Canada},
Title = {Geo Deep Learning},
Year = {2020},
Publisher = {GitHub},
Journal = {GitHub repository},
Howpublished = {\url{https://github.com/NRCan/geo-deep-learning}}
}
Or you can also use the CITATION.cff file to cite this project.
Contacting us
The best way to get in touch is to open an issue or comment on any open issue or pull request.
License
Project is distributed under MIT License.
[comment]: <> (## Segmentation on RGB-NIR images with transfer learning)
[comment]: <> ()
[comment]: <> (This section present a different way to use a model with RGB-Nir images. For more informations on the implementation, see the article [Transfer Learning from RGB to Multi-band Imagery](https://www.azavea.com/blog/2019/08/30/transfer-learning-from-rgb-to-multi-band-imagery/) frome [Azavea](https://www.azavea.com/).)
[comment]: <> (Specifications on this functionality:)
[comment]: <> (- At the moment this functionality is only available for the [Deeplabv3 (backbone: resnet101)](https://arxiv.org/abs/1706.05587))
[comment]: <> (- You may need to reduce the size of the batch_size to fit everything in the memory.)
[comment]: <> (To use this functionality, you will need to change the global section of your yaml file. The parameters to use this module are:)
[comment]: <> (```yaml)
[comment]: <> (# Global parameters)
[comment]: <> (global:)
[comment]: <> ( samples_size: 256)
[comment]: <> ( num_classes: 4 )
[comment]: <> ( data_path: /home/cauthier/data/)
[comment]: <> ( numberofbands: 4 # <-- must be 4 for the R-G-B-NIR)
[comment]: <> ( modelname: deeplabv3resnet101 # <-- must be deeplabv3_resnet101)
[comment]: <> ( task: segmentation # <-- must be a segmentation task)
[comment]: <> ( num_gpus: 2)
[comment]: <> ( # Module to include the NIR)
[comment]: <> ( modalities: RGBN # <-- must be add)
[comment]: <> ( concatenate_depth: 'layer4' # <-- must specify the point where the NIR will be add)
[comment]: <> (```)
[comment]: <> (The rest of the yaml don't have to change.The major changes are the modalities, number_of_bands and concatenate_depth parameters.)
[comment]: <> (If the model select is not model_name: deeplabv3_resnet101, but the number_of_band = 4 and the modalities = RGBN, the model will train with the chosen architecture with a input image of 4 dimensions.)
[comment]: <> (Since we have the concatenation point for the NIR band only for the deeplabv3_resnet101, the concatenate_depth parameter option are layers in the resnet101 backbone: 'conv1', 'maxpool', 'layer2', 'layer3' and 'layer4'.)
[comment]: <> (Illustration of the principle will fellow soon)
Owner
- Name: Natural Resources Canada
- Login: NRCan
- Kind: organization
- Location: Canada
- Website: https://natural-resources.canada.ca/
- Repositories: 42
- Profile: https://github.com/NRCan
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit. # Visit https://bit.ly/cffinit to generate yours today! cff-version: 1.2.0 title: Geo-deep-learning message: >- If you use this software, please cite it using the metadata from this file. type: software authors: - affiliation: 'Natural Resources Canada, Government of Canada' repository-code: 'https://github.com/NRCan/geo-deep-learning' license: MIT version: 1.2.0 date-released: '2020-10-13'
GitHub Events
Total
- Issues event: 5
- Watch event: 18
- Push event: 58
- Pull request event: 3
- Fork event: 6
- Create event: 2
Last Year
- Issues event: 5
- Watch event: 18
- Push event: 58
- Pull request event: 3
- Fork event: 6
- Create event: 2
Committers
Last synced: about 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| CharlesAuthier | c****3@g****m | 158 |
| CharlesAuthier | a****3@g****m | 141 |
| valhassan | v****n@c****a | 101 |
| remtav | 3****v | 96 |
| Mathieu Turgeon-Pelchat | m****t@c****a | 64 |
| remi | r****n@g****m | 56 |
| mpelchat04 | 3****4 | 30 |
| victorlazio109 | v****9@y****m | 27 |
| Blaise Gauvin St-Denis | b****s@g****m | 17 |
| E Peterson | e****n@c****a | 16 |
| Mikhail Sokolov | 5****b | 14 |
| Yves Moisan | y****n | 6 |
| E Peterson | 4****2 | 6 |
| Yves Moisan | y****2@c****a | 5 |
| ymoisan | y****n@n****a | 3 |
| rtavon | r****n@n****a | 2 |
| CharlesAuthier | c****r@l****a | 2 |
| veurman3 | 6****3 | 1 |
| RichardScottOZ | 7****Z | 1 |
| felegare | 5****e | 1 |
| Carl Lemaire | 1****l | 1 |
| Matthew Kutugata | 5****u | 1 |
| Yves Choquette | y****e@c****a | 1 |
| Pierre-Luc St-Charles | p****s@g****m | 1 |
| CharlesAuthier | c****r@n****a | 1 |
| Francis Charette Migneault | f****t@g****m | 1 |
| Dan-Eli | D****i | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 2 years ago
All Time
- Total issues: 71
- Total pull requests: 49
- Average time to close issues: 10 months
- Average time to close pull requests: about 2 months
- Total issue authors: 14
- Total pull request authors: 6
- Average comments per issue: 1.28
- Average comments per pull request: 0.76
- Merged pull requests: 39
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 40
- Pull requests: 37
- Average time to close issues: 28 days
- Average time to close pull requests: 7 days
- Issue authors: 11
- Pull request authors: 6
- Average comments per issue: 0.55
- Average comments per pull request: 0.59
- Merged pull requests: 31
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- remtav (29)
- valhassan (21)
- ymoisan (6)
- CharlesAuthier (6)
- LucaRom (4)
- Abdielfer (4)
- micpilon (2)
- FatemehEsfahani (2)
- Ling-Jun (2)
- krishanr (1)
- ms888ekb (1)
- mpelchat04 (1)
- mkutu (1)
Pull Request Authors
- CharlesAuthier (16)
- ms888ekb (14)
- valhassan (12)
- remtav (12)
- mpelchat04 (5)
- LucaRom (3)
- MarjanAsgari (3)
- FatemehEsfahani (1)
- SimonLalan7 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- nvidia/cuda 11.2.0-cudnn8-runtime-ubuntu20.04 build
- actions/checkout v3 composite
- docker/login-action v2 composite
- docker/metadata-action v4 composite
- sphinx ==7.1.2
- sphinx-rtd-theme ==1.3.0rc1
- hydra-colorlog >=1.1.0
- hydra-optuna-sweeper >=1.1.0
- mlflow >=1.2
- ttach >=0.0.3