Skip to content

USAFORUNHCRhive/turkana-grid-mapping

Introduction

** Jump to: Setup | Directory Structure | Data Acquisition | Sample Tutorial | Acknowledgments | License | Contributing

Mapping electrical infrastructure can support measuring access to electricity and can help identify opportunities to improve or extend exisiting power infrastructure. High resolution orthorectified imagery (such as drone imagery) can be used to map power distribution infrastructure. The figure below shows a sample power distribution network that can be mapped using this repository. Here, power infrastructure mapping across the distribution network is done by:

  1. Detecting electrical poles
  2. Segmenting power distribution lines

Examples of power infrastructure

Setup

Clone this repo and install the conda environment

git clone <REPO-URL>
cd <REPO-NAME>
conda env create -f environment.yml
conda activate gridmapper

Requirements:

  • Linux recommended (environment includes Linux-specific packages).
  • NVIDIA GPU with CUDA 11.7 (8GB+ VRAM recommended).

Directory Structure

.
├── environment.yml
├── LICENSE.md
├── README.md
├── TUTORIAL.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── SECURITY.md
└── src
    ├── figures
    │   └── power_infrastructure_examples.png
    ├── lines
    │   ├── data
    │   │   ├── dataloader_line.py
    │   │   ├── line_dataprep.py
    │   │   ├── line_tile_dataset.py
    │   │   └── streaming_line_dataset.py
    │   ├── line_config.yaml
    │   ├── line_inference.py
    │   ├── lineseg
    │   │   ├── base_network.py
    │   │   ├── line_tasks.py
    │   │   └── unet.py
    │   ├── line_train.py  
    │   └──notebooks
    │       └── 01-00-visualize_patches.ipynb
    └── poles
        ├── data
        │   ├── dataloader_pole.py
        │   ├── pole_dataprep.py
        │   ├── pole_tile_dataset.py
        │   └── streaming_pole_dataset.py
        ├── pole_config.yaml
        ├── poledetect
        │   ├── fcn8_resnet.py
        │   ├── lcfcn_loss.py
        │   ├── pole_metrics.py
        │   ├── pole_tasks.py
        ├── pole_inference.py
        └── pole_train.py

Data Acquisition

This project uses TIFF files of aerial imagery, corresponding point vector labels (for electrical poles) and linestring vector labels (for electrical lines), as GeoJSON or GeoPackage files. You can request a small sample dataset hosted on Azure blob storage, collected by USA for UNHCR and the Humanitarian OpenStreetMap Team:

  1. Request a data download URL from USA for UNHCR.

  2. Once you have the URL, you can use it to access the data on Azure blob storage. Here's an example of how you can download the data with azcopy:

azcopy copy --recursive <AZURE_BLOB_URL> <DESTINATION_PATH>
  1. The downloaded raw data folder contains power_infrastructure_demo data that can be used to follow the sample tutorial.

  2. After downloading the data, set the right paths in the config files (src/poles/pole_config.yaml, src/lines/line_config.yaml) as described in the tutorial.

Sample Tutorial

A sample tutorial walking through the project can be found in TUTORIAL.md.

Acknowledgements

This project was made possible through the collaboration of several organizations: USA for UNHCR, UNHCR, Humanitarian OpenStreetMap Team, and the Microsoft AI for Good Lab.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contributing

If you're interested in contributing to this project check out the contributing guide for more details. We also welcome ideas for other ways to contribute - please reach out to [email protected].

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages