Git Product home page Git Product logo

cresi's Introduction

Alt text

CRESI

City-scale Road Extraction from Satellite Imagery

This repository provides an end-to-end pipeline to train models to detect routable road networks over entire cities, and also provide speed limits and travel time estimates for each roadway. We have observed success with both SpaceNet imagery and labels, as well as Google satellite imagery with OSM labels. The repository consists of pre-processing modules, deep learning segmentation model (inspired by the winning SpaceNet 3 submission by albu), post-proccessing modules to extract the road networks, inferred speed limits, and travel times. Furthermore, we include modules to scale up network detection to the city-scale, rather than just looking at small image chips. The output of CRESI is a geo-referenced NetworkX graph, with full access to the many graph-theoretic algorithms included in this package.
For further details see:

  1. Our WACV Paper
  2. Blogs:
    1. Large Road Networks
    2. Road Speeds
    3. OSM+Google Imagery
    4. SpaceNet 5 Baseline Part 1 - Data Prep
    5. SpaceNet 5 Baseline Part 2 - Segmentation
    6. SpaceNet 5 Baseline Part 3 - Road Graph + Speed
    7. SpaceNet 5 Speed / Performance Comparision

Install

  1. Download this repository

  2. Build docker image

     nvidia-docker build -t cresi /path_to_cresi/docker/[cpu, gpu]
    
  3. Create docker container (all commands should be run in this container)

     nvidia-docker run -it --rm -ti --ipc=host --name cresi_image cresi
    

Prep

  1. Prepare train/test data, e.g.:

     python /path_to_cresi/cresi/data_prep/speed_masks.py
    
  2. Edit .json file to select desired variables and point to appropriate directories


Train

  1. All at once

     cd /path_to_cresi/cresi
    
     ./train.sh configs/sn5_baseline.json
    
  2. Run commands individually

    A. Generate folds (within docker image)

     python /path_to_cresi/cresi/00_gen_folds.py configs/sn5_baseline.json
    

    B. Run train script (within docker image)

     python /path_to_cresi/cresi/01_train.py configs/sn5_baseline.json --fold=0
    

Test

  1. All at once

     cd /path_to_cresi/cresi
    
     ./test.sh configs/sn5_baseline.json
    
  2. Run commands individually

    A. Execute inference (within docker image)

     python /path_to_cresi/cresi/02_eval.py configs/sn5_baseline.json
    

    B. Merge predictions (if required)

     python /path_to_cresi/cresi/03a_merge_preds.py configs/sn5_baseline.json
    

    C. Stitch together mask windows (if required)

     python /path_to_cresi/cresi/03b_stitch.py configs/sn5_baseline.json
    

    D. Extract mask skeletons

     python /path_to_cresi/cresi/04_skeletonize.py configs/sn5_baseline.json
    

    E. Create graph

     python /path_to_cresi/cresi/05_wkt_to_G.py configs/sn5_baseline.json
    

    F. Infer road travel time and speed limit

     python /path_to_cresi/cresi/06_infer_speed.py configs/sn5_baseline.json
    

Outputs will look something like the image below:

Alt text

cresi's People

Contributors

avanetten avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.